当前位置: 首页>>代码示例>>Python>>正文


Python sublime.HIDDEN属性代码示例

本文整理汇总了Python中sublime.HIDDEN属性的典型用法代码示例。如果您正苦于以下问题:Python sublime.HIDDEN属性的具体用法?Python sublime.HIDDEN怎么用?Python sublime.HIDDEN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在sublime的用法示例。


在下文中一共展示了sublime.HIDDEN属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: visible

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def visible():
    fill = settings.get('fill_conflict_area')
    outline = settings.get('outline_conflict_area')

    flags = 0
    if _st_version < 3000:
        # If fill is set then outline is ignored; ST2 doesn't provide a combination
        if not (fill or outline):
            flags = sublime.HIDDEN
        elif not fill and outline:
            flags = sublime.DRAW_OUTLINED
    else:
        if not fill:
            flags |= sublime.DRAW_NO_FILL
        if not outline:
            flags |= sublime.DRAW_NO_OUTLINE

    return flags 
开发者ID:sascha-wolf,项目名称:sublime-GitConflictResolver,代码行数:20,代码来源:drawing_flags.py

示例2: run

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def run(self, edit, **args):
    view = self.view
    point = args.get("point")
    view.insert(edit, point, args.get("text"))
    region = sublime.Region(point, len(args.get("text")))
    if "key" in args:
      scope = args.get("scope") if "scope" in args else ""
      scope_dot = "." + scope if scope else ""
      icon = args.get("icon") if "icon" in args else ""
      flags = args.get("flags") if "flags" in args else sublime.HIDDEN
      key = args.get("key") + scope_dot
      regions = [region] + view.get_regions(args.get("key") + scope_dot)

      view.add_regions(key, regions, scope, icon, flags)

      if "region_id" in args and args.get("region_id"):
        view.add_regions(args.get("region_id"), [region], scope, icon, flags) 
开发者ID:pichillilorenzo,项目名称:JavaScriptEnhancements,代码行数:19,代码来源:insert_text_view.py

示例3: run

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def run(self, edit, **args):
    view = self.view
    region = sublime.Region(args.get("start"), args.get("end"))
    view.replace(edit, region, args.get("text"))
    if "key" in args:
      scope = args.get("scope") if "scope" in args else ""
      scope_dot = "." + scope if scope else ""
      icon = args.get("icon") if "icon" in args else ""
      flags = args.get("flags") if "flags" in args else sublime.HIDDEN
      key = args.get("key") + scope_dot
      regions = [region] + view.get_regions(args.get("key") + scope_dot)

      view.add_regions(key, regions, scope, icon, flags)

      if "region_id" in args and args.get("region_id"):
        view.add_regions(args.get("region_id"), [region], scope, icon, flags) 
开发者ID:pichillilorenzo,项目名称:JavaScriptEnhancements,代码行数:18,代码来源:replace_text_view.py

示例4: run

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def run(self, edit, **args):
    view = self.view
    view.erase(edit, sublime.Region(args.get("start"), args.get("end")))
    view.insert(edit, args.get("start"), args.get("text"))
    region = sublime.Region(args.get("start"), args.get("start")+len(args.get("text")))
    if "key" in args:
      scope = args.get("scope") if "scope" in args else ""
      scope_dot = "." + scope if scope else ""
      icon = args.get("icon") if "icon" in args else ""
      flags = args.get("flags") if "flags" in args else sublime.HIDDEN
      key = args.get("key") + scope_dot
      regions = [region] + view.get_regions(args.get("key") + scope_dot)

      view.add_regions(key, regions, scope, icon, flags)

      if "region_id" in args and args.get("region_id"):
        view.add_regions(args.get("region_id"), [region], scope, icon, flags) 
开发者ID:pichillilorenzo,项目名称:JavaScriptEnhancements,代码行数:19,代码来源:replace_region_view.py

示例5: run

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def run(self, edit, **args):
    view = self.view
    point = view.size()
    view.insert(edit, point, args.get("text"))
    region = sublime.Region(point, view.size())
    if "key" in args:
      scope = args.get("scope") if "scope" in args else ""
      scope_dot = "." + scope if scope else ""
      icon = args.get("icon") if "icon" in args else ""
      flags = args.get("flags") if "flags" in args else sublime.HIDDEN
      key = args.get("key") + scope_dot
      regions = [region] + view.get_regions(args.get("key") + scope_dot)

      view.add_regions(key, regions, scope, icon, flags)

      if "region_id" in args and args.get("region_id"):
        view.add_regions(args.get("region_id"), [region], scope, icon, flags) 
开发者ID:pichillilorenzo,项目名称:JavaScriptEnhancements,代码行数:19,代码来源:append_text_view.py

示例6: hidden

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def hidden():
    flags = 0
    if _st_version < 3000:
        flags = sublime.HIDDEN
    else:
        flags = (sublime.DRAW_NO_FILL |
                 sublime.DRAW_NO_OUTLINE)

    return (flags | sublime.HIDE_ON_MINIMAP) 
开发者ID:sascha-wolf,项目名称:sublime-GitConflictResolver,代码行数:11,代码来源:drawing_flags.py

示例7: render

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def render(self) -> None:
		self.dispose()

		image = self.breakpoint.image
		line = self.breakpoint.line
		column = self.breakpoint.column

		p = self.view.text_point(line - 1, 0)

		self.view.add_regions(self.breakpoint.region_name, [sublime.Region(p, p)], scope=self.breakpoint.scope(), icon=image.file, flags=sublime.HIDDEN)

		if column and self.breakpoint.dap.column:
			p = self.view.text_point(line - 1, column - 1)
			self.column_phantom = ui.Phantom(ui.click(self.on_click_inline)[ui.icon(image)], self.view, sublime.Region(p, p)) 
开发者ID:daveleroy,项目名称:sublime_debugger,代码行数:16,代码来源:source_breakpoints.py

示例8: workaroundForRefreshBug

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def workaroundForRefreshBug(self, view, selection):
    # work around sublime bug with caret position not refreshing
    # see: https://github.com/code-orchestra/colt-sublime-plugin/commit/9e6ffbf573fc60b356665ff2ba9ced614c71120f

    bug = [s for s in selection]
    view.add_regions("bug", bug, "bug", "dot", sublime.HIDDEN | sublime.PERSISTENT)
    view.erase_regions("bug") 
开发者ID:philippotto,项目名称:Sublime-MultiEditUtils,代码行数:9,代码来源:MultiEditUtils.py

示例9: highlight_regions

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def highlight_regions(fr):
  regions = []
  regions0 = []
  domain0 = DOMAIN+'-zero'

  if len(fr.errors) > 0:
    print('\n%s' % fr.file)
  else:
    print('\n%s\nCongratulations! Everything is OK!' % fr.file)

  for r in fr.errors:
    row = r.get('line') or 0
    col = r.get('column') or 0
    print('%s:%s %s' % (row, col, r.get('message').encode('utf-8')))
    line = fr.view.line(fr.view.text_point(row-1, 0))
    pos = line.begin() + col
    if pos >= line.end():
      pos = line.end()
    if pos == line.begin():
      regions0.append(sublime.Region(pos, pos))
    else:
      regions.append(sublime.Region(pos, pos))

  if regions:
    fr.view.add_regions(DOMAIN, regions, 'comment', 'dot', sublime.DRAW_EMPTY_AS_OVERWRITE)
  else:
    fr.view.erase_regions(DOMAIN)

  if regions0:
    fr.view.add_regions(domain0, regions0, 'comment', 'dot', sublime.HIDDEN)
  else:
    fr.view.erase_regions(domain0) 
开发者ID:leeight,项目名称:Baidu-FE-Code-Style,代码行数:34,代码来源:fecs.py

示例10: add

# 需要导入模块: import sublime [as 别名]
# 或者: from sublime import HIDDEN [as 别名]
def add(self, text, key="", scope="", icon="", flags=sublime.HIDDEN, region_id="", padding=0, display_block=False, insert_point=None, replace_points=[]):

    if region_id in self.region_ids:
      raise Exception("Error: ID "+region_id+" already used.")

    if region_id:
      self.region_ids.append(region_id)

    space = (" "*int(padding))
    text = space+text+space

    self.view.set_read_only(False)

    if insert_point:

      self.view.run_command("javascript_enhancements_insert_text_view", args={"text": text, "key": key, "scope": scope, "icon": icon, "flags": flags, "region_id": region_id, "point": insert_point})
      if display_block:
        self.view.run_command("javascript_enhancements_insert_text_view", args={"text": "\n", "key": "", "scope": "", "icon": "", "flags": sublime.HIDDEN, "point": insert_point+len(text)})

    elif replace_points:

      self.view.run_command("javascript_enhancements_replace_region_view", args={"text": text, "key": key, "scope": scope, "icon": icon, "flags": flags, "region_id": region_id, "start": replace_points[0], "end": replace_points[1]})
    
    else:

      self.view.run_command("javascript_enhancements_append_text_view", args={"text": text, "key": key, "scope": scope, "icon": icon, "flags": flags, "region_id": region_id})
      if display_block:
        self.view.run_command("javascript_enhancements_append_text_view", args={"text": "\n", "key": "", "scope": "", "icon": "", "flags": sublime.HIDDEN})

    self.view.set_read_only(True) 
开发者ID:pichillilorenzo,项目名称:JavaScriptEnhancements,代码行数:32,代码来源:window_view.py


注:本文中的sublime.HIDDEN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。