从崇高的文本2取消自动完成(点);如何prevent"&QUOT? [英] How to prevent "."(dot) from cancelling autocomplete in Sublime Text 2?

查看:106
本文介绍了从崇高的文本2取消自动完成(点);如何prevent"&QUOT?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经定义了一些关键字的专有语言,我在工作中使用:

I have defined some keywords for a proprietary language I use at work:

{ "match": "\\b(util.tickettimelimit|util.user_ip|util.server_name|util.today)\\b",
  "name": "keyword.source.GTX2",
    "comment": "Tags"
}

我也有一个完成的文件:

I also have a completion file:

{
  "scope": "source.GTX2",

  "completions":
  [
    "util.server_name",
    "util.tickettimelimit",
    "util.today",
    "util.user_ip"
  ]
}

当我开始键入UTIL我看到正确的自动完成选项:

When I start typing "util" I see the correct autocomplete options:

但只要我进入(点)自动完成选项走开。

But as soon as I enter the "."(dot) autocomplete options go away:

有没有办法来改变这种行为?我只是想的关键字被trated作为一个整体的东西,忽略了点。

Is there a way to change this behavior? I just want the keywords to be trated as a whole thing and ignore the dots.

谢谢!

推荐答案

我到处找我就可以了,它似乎自动完成code嵌入可执行文件本身(至少在Windows中,我的天堂'吨检查了我的苹果还),而不是在诸多外部的.py 文件之一散落,所以我甚至不能看到自动完成是怎样的参数执行。我通过默认看了包/默认/ preferences.sublime的设置文件,同时也有与自动完成几种选择,有没有关于我们要找的。虽然期待通过在同一目录下的默认(Windows)中.sublime-键盘映射文件,我尝试添加以下内容:

I've looked everywhere I can, and it seems the auto-complete code is embedded within the executable itself (at least on Windows, I haven't checked my Mac yet), and not in one of the numerous external .py files scattered around, so I can't even see the parameters for how auto-completion is performed. I looked through the default Packages/Default/Preferences.sublime-settings file and while there are several options relating to auto-complete, there are none relating to what we're looking for. While looking through the Default (Windows).sublime-keymap file in the same directory, I tried adding the following:

{ "keys": ["."], "command": "hide_auto_complete", "context":
    [
        { "key": "auto_complete_visible", "operator": "equal", "operand": false }
    ]
},

但可惜没有奏效。有许多的 auto_complete 命令在那里,虽然这看起来是最有前途的我还没有试过的其余部分。

but alas it didn't work. There are a number of auto_complete commands there, and while this looked the most promising I haven't tried the rest.

我没有通过源和配置文件详尽地找了漂亮的崇高codeIntel 插件(也可通过包控制),因此有可能你也许可以找到一个选项​​那里。你可能不得不完全禁用内置的自动完成功能第一,所以它不会覆盖SCI。

I haven't exhaustively looked through the source and config files for the nifty SublimeCodeIntel plugin (also available through Package Control), so it's possible you might be able to find an option there. You'd probably have to completely disable the built-in auto-complete functionality first, so it doesn't override SCI.

所以,我想现在有没有什么可以做。您可以随时离开功能要求并看它是否入的崇高文字3 ,或搜索/打开上的崇高文本论坛,看看是否任何人有任何建议。祝你好运!

So, I guess for now there's not much you can do. You can always leave a feature request and see if it makes it into Sublime Text 3, or search/open a thread on the Sublime Text Forum and see if anyone else has any suggestions. Good luck!

这篇关于从崇高的文本2取消自动完成(点);如何prevent"&QUOT?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆