简体   繁体   English

Sublime Text 2自动完成快捷方式无效

[英]Sublime Text 2 autocompletion shortcut not working

I'm getting really crazy right now. 我现在变得非常疯狂。 The shortcut for autocompletion in Sublime Text 2 (ctrl+space ??) won't work for me. Sublime Text 2(ctrl + space ??)中自动完成的快捷方式对我不起作用。 Every time I press ctrl+space it gives me the last word I typed before. 每次按ctrl + space,它都会给我输入之前输入的最后一个单词。 But the code completion does work while I'm typing. 但是在我输入时代码完成确实有效。

Anyone that knows how to fix this or what's wrong? 谁知道如何解决这个或什么是错的?

A video to make clear what a mean: http://shots.wouterds.be/ST2-CodeCompletion-Help-0oD220SKlB.mov 一个视频,以明确是什么意思: http//shots.wouterds.be/ST2-CodeCompletion-Help-0oD220SKlB.mov

That particular popup isn't Sublime Text 2's built-in autocomplete dialog at all -- it's the SublimeCodeIntel code suggestion window. 那个特定的弹出窗口根本不是Sublime Text 2的内置自动完成对话框 - 它是SublimeCodeIntel代码建议窗口。

Sublime Text 2 by itself only offers autocompletion suggestions based on snippets, API-injected completions, .sublime-completions files, and words in the buffer (see here for more information). Sublime Text 2本身仅提供基于片段,API注入的完成, .sublime-completions文件和缓冲区中的单词的自动完成建议(有关更多信息,请参见此处 )。 SublimeCodeIntel, on the other hand, builds a library of suggestions based on the language you're using and (presumably) the project you're working on. 另一方面,SublimeCodeIntel根据您正在使用的语言(可能是)您正在处理的项目构建一个建议库。 You should be able to tell which window is which by examining the content of the popup versus the content of your working file -- SublimeCodeIntel's suggestions will contain more information (like the (function) keyword) and might include words not present in the current file. 您应该能够通过检查弹出窗口的内容与工作文件的内容来确定哪个窗口是哪个窗口 - SublimeCodeIntel的建议将包含更多信息(如(function)关键字)并且可能包含当前文件中不存在的字词。

SublimeCodeIntel's suggestion list pops up automatically while you're typing, but has a distinct keyboard shortcut listed in your Preferences -> Package Settings -> SublimeCodeIntel -> Key Bindings -- Default file. 当您输入时,SublimeCodeIntel的建议列表会自动弹出,但您的Preferences -> Package Settings -> SublimeCodeIntel -> Key Bindings -- Default文件中列出了一个独特的键盘快捷键。 Ctrl+Space calls the default autocompletion dialog. Ctrl+Space调用默认的自动完成对话框。 You could potentially adjust the completion shortcuts so that Ctrl+Space instead raises SublimeCodeIntel's autocompletion list by adding the line... 您可以调整完成快捷方式,以便Ctrl+Space通过添加行来提升SublimeCodeIntel的自动完成列表...

{ "keys": ["ctrl+space"], "command": "code_intel_auto_complete" }

...to your Preferences -> Key Bindings -- User file, although doing so might mess up the appearance of the regular autocompletion window. ...到你的Preferences -> Key Bindings -- User文件,虽然这样做可能会破坏常规自动完成窗口的外观。

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

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