Autocomplete for all text in current file

How can I turn on autocomplete to suggest for all text in the current file? The context/scoping for autocomplete isn't very smart :-/

Comment actions Permalink

Haven't got what you mean, sorry... Would you like to limit the completion to variables/functions from current file only? or, would you like the completion to suggest all words you have typed in current file? In the latter case, did you try 'hippie completion' (cyclic expand word) - it's Alt+Slash in default keymap? See

Comment actions Permalink

Elena, he means something like the Default Autocomplete that comes with Notepad++: .

This would be something that would trigger without needing to press any hotkeys, but wouldn't get inserted without pressing Enter or Tab.

In my opinion, this would be a VERY helpful addition.  AFAIK, there is no way to do this in IntelliJ.

Comment actions Permalink

Webstorm auto-completes code where appropriate - while typing variable, etc. names, after `.`, etc.

Showing auto-completion just on entering plain text would be rather annoying.

Comment actions Permalink

Elena, I don't think you understand the feature yet.  It is not annoying.  One of the world's most popular text editors has it.

Consider typing the following:

my_map = {
  'key' = 'value',
  'very_long_key_that_is_hard_to_type' = 'value_that_i_really_want'
# Note: often we get dicts from external data sources and we can't control the key names to make them short.

my_|desired = my_map['very|

In the above, the final line has two pipes (|).  These are the points at which the auto-complete would appear either with min_match=3 (for `my_|`) or min_match=4 (for `very|`.  I usually set my min_match to 3 in settings.

In the first case, you would get the option to select `my_map` by pressing enter or ignoring the autocomplete.  If your min_match was 4, you would not see an autocomplete option here at all.

In the second case, you would see `very_long_key_that_is_hard_to_type`.  That would be VERY useful.


Please sign in to leave a comment.