本文整理汇总了Python中sublime.View.command_history方法的典型用法代码示例。如果您正苦于以下问题:Python View.command_history方法的具体用法?Python View.command_history怎么用?Python View.command_history使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sublime.View
的用法示例。
在下文中一共展示了View.command_history方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_modified
# 需要导入模块: from sublime import View [as 别名]
# 或者: from sublime.View import command_history [as 别名]
def on_modified(self, view: sublime.View) -> None:
"""Called after changes has been made to a view
"""
if view.command_history(0)[0] in ("expand_tabs", "unexpand_tabs"):
return
if not is_python(view) or not get_settings(view, 'display_signatures'):
return
try:
location = view.rowcol(view.sel()[0].begin())
if view.substr(view.sel()[0].begin()) in ['(', ')']:
location = (location[0], location[1] - 1)
data = prepare_send_data(location, 'doc', 'jedi')
use_tooltips = get_settings(
view, 'enable_signatures_tooltip', True
)
st_version = int(sublime.version())
if st_version >= 3070:
data['html'] = use_tooltips
currying = partial(self.prepare_data_status, view)
if use_tooltips and st_version >= 3070:
currying = partial(self.prepare_data_tooltip, view)
Worker().execute(currying, **data)
except Exception as error:
logging.error(error)