简体   繁体   English

有没有办法在没有按Tab键的情况下在Sublime Text中设置Anaconda自动完成功能?

[英]Is there any way to set Anaconda autocompletion in Sublime Text without pressing the tab key?

I'm using SublimeText3 with Anaconda. 我正在使用SublimeText3和Anaconda。 I'm wondering if there is any way to pop up Anaconda auto-completion without any key. 我想知道是否有任何方法可以在没有任何密钥的情况下弹出Anaconda自动完成功能。 I tried to use SublimeCodeIntel and CodeComplice and was impressed with their autocompletion. 我尝试使用SublimeCodeIntel和CodeComplice,并对其自动完成感到印象深刻。 But I had a hard time with configuration and its errors and now I'm trying Anaconda. 但是我在配置和错误方面遇到了困难,现在我正在尝试使用Anaconda。 It seems like it's really working well but I think I would be more happy if it automatically showed autocomplete suggestions since my little finger is twisted from birth and I'm not so good at pressing the tab key :) Could anyone tell me if it's possible or any alternative idea? 看起来它确实运行良好,但我想如果它自动显示自动完成建议我会更高兴,因为我的小手指从出生就扭曲了,我不太擅长按Tab键:)有人能告诉我是否有可能还是其他想法? Thank you! 谢谢!

For me it works by using: 对我来说它的工作原理是:

{
    "auto_complete": true,
    "auto_complete_commit_on_tab": true,
}

in sublime user settings. 在崇高的用户设置中。 Then I get autocompletion suggestions automatically without pressing anything. 然后我自动获得自动完成建议而不按任何东西。 I then push tab to commit. 然后我按Tab键提交。

Open your user preferences ( Preferences -> Settings-User ) and add the following setting: 打开您的用户首选项( Preferences -> Settings-User )并添加以下设置:

"auto_complete_triggers":
[
    {
        "characters": ".",
        "selector": "source, text.html"
    }
]

Now, every time you press . 现在,每次按下. , a popup showing all of the possible methods/attributes will show. ,将显示一个显示所有可能的方法/属性的弹出窗口。 Also, if you have the following setting: 此外,如果您有以下设置:

"auto_complete_commit_on_tab": false

you can just hit Enter to select your desired completion option instead of Tab . 您只需按Enter键即可选择所需的完成选项,而不是Tab

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM