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


Python _base.NoneditableTextObject类代码示例

本文整理汇总了Python中UltiSnips.text_objects._base.NoneditableTextObject的典型用法代码示例。如果您正苦于以下问题:Python NoneditableTextObject类的具体用法?Python NoneditableTextObject怎么用?Python NoneditableTextObject使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: __init__

    def __init__(self, parent, token):
        # Find our containing snippet for visual_content
        snippet = parent
        while snippet:
            try:
                self._text = snippet.visual_content.text
                self._mode = snippet.visual_content.mode
                break
            except AttributeError:
                snippet = snippet._parent
        if not self._text:
            self._text = token.alternative_text
            self._mode = "v"

        NoneditableTextObject.__init__(self, parent, token)
开发者ID:LuisFGomez,项目名称:vim,代码行数:15,代码来源:_visual.py

示例2: __init__

    def __init__(self, parent, token):
        # Find our containing snippet for visual_content
        snippet = parent
        while snippet:
            try:
                self._text = snippet.visual_content.text
                self._mode = snippet.visual_content.mode
                break
            except AttributeError:
                snippet = snippet._parent  # pylint:disable=protected-access
        if not self._text:
            self._text = token.alternative_text
            self._mode = "v"

        NoneditableTextObject.__init__(self, parent, token)
        TextObjectTransformation.__init__(self, token)
开发者ID:char101,项目名称:ultisnips,代码行数:16,代码来源:_visual.py

示例3: __init__

    def __init__(self, parent, token):

        # Find our containing snippet for snippet local data
        snippet = parent
        while snippet:
            try:
                self._locals = snippet.locals
                text = snippet.visual_content.text
                mode = snippet.visual_content.mode
                break
            except AttributeError:
                snippet = snippet._parent  # pylint:disable=protected-access
        self._snip = SnippetUtil(token.indent, mode, text)

        self._codes = ((
            "import re, os, vim, string, random",
            "\n".join(snippet.globals.get("!p", [])).replace("\r\n", "\n"),
            token.code.replace("\\`", "`")
        ))
        NoneditableTextObject.__init__(self, parent, token)
开发者ID:char101,项目名称:ultisnips,代码行数:20,代码来源:_python_code.py

示例4: __init__

    def __init__(self, parent, token):

        # Find our containing snippet for snippet local data
        snippet = parent
        while snippet:
            try:
                self._locals = snippet.locals
                text = snippet.visual_content.text
                mode = snippet.visual_content.mode
                context = snippet.context
                break
            except AttributeError as e:
                snippet = snippet._parent  # pylint:disable=protected-access
        self._snip = SnippetUtil(token.indent, mode, text, context, snippet)

        self._codes = ((
            'import re, os, vim, string, random',
            '\n'.join(snippet.globals.get('!p', [])).replace('\r\n', '\n'),
            token.code.replace('\\`', '`')
        ))
        NoneditableTextObject.__init__(self, parent, token)
开发者ID:guns,项目名称:haus,代码行数:21,代码来源:_python_code.py

示例5: __init__

    def __init__(self, parent, token):
        code = token.code.replace("\\`", "`")

        # Find our containing snippet for snippet local data
        snippet = parent
        while snippet:
            try:
                self._locals = snippet.locals
                break
            except AttributeError:
                snippet = snippet._parent
        self._snip = SnippetUtil(token.indent)

        self._globals = {}
        globals = snippet.globals.get("!p", [])
        compatible_exec("\n".join(globals).replace("\r\n", "\n"), self._globals)

        # Add Some convenience to the code
        self._code = "import re, os, vim, string, random\n" + code

        NoneditableTextObject.__init__(self, parent, token)
开发者ID:LuisFGomez,项目名称:vim,代码行数:21,代码来源:_python_code.py

示例6: __init__

    def __init__(self, parent, token):
        self._code = token.code.replace("\\`", "`").strip()

        NoneditableTextObject.__init__(self, parent, token)
开发者ID:char101,项目名称:ultisnips,代码行数:4,代码来源:_viml_code.py

示例7: __init__

 def __init__(self, parent):
     NoneditableTextObject.__init__(
         self, parent, _vim.buf.cursor, _vim.buf.cursor,
         tiebreaker=Position(-1, -1))
开发者ID:ANHVNSE02067,项目名称:vimconfig-ubuntu,代码行数:4,代码来源:_snippet_instance.py

示例8: __init__

 def __init__(self, parent, token):
     NoneditableTextObject.__init__(self, parent, token)
     self._code = token.code.replace('\\`', '`')
     self._tmpdir = _get_tmp()
开发者ID:981746,项目名称:ultisnips,代码行数:4,代码来源:_shell_code.py

示例9: __init__

 def __init__(self, parent, tabstop, token):
     NoneditableTextObject.__init__(self, parent, token)
     self._ts = tabstop
开发者ID:981746,项目名称:ultisnips,代码行数:3,代码来源:_mirror.py


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