當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。