Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. Every time I press ctrl+space it gives me the last word I typed before. 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

like image 301
wouterds Avatar asked Jan 20 '26 20:01

wouterds


1 Answers

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 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). 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. 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'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. Ctrl+Space calls the default autocompletion dialog. You could potentially adjust the completion shortcuts so that Ctrl+Space instead raises SublimeCodeIntel's autocompletion list by adding the line...

{ "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.

like image 89
angerson Avatar answered Jan 22 '26 20:01

angerson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!