+94

Option for autocomplete to search all open documents, not just current one

Matt Baker 13 aastat tagasi uuendaja Vladislav Turbanov 12 aastat tagasi 18
It would be super useful if autocomplete searched all open buffers/documents for words, instead of just the one being currently edited. This is basically how Vim's Omnicomplete works (unless you deck it out with crazy options and plugins). It also seems like a much quicker option than the full-blown Intellisense-style proposals for autocomplete, and wouldn't need language-level support.

If there are people who prefer single-buffer completion, maybe it would just be a flag somewhere that could be set to enable multi-buffer autocomplete?

Ordering the suggestions would be a bit more difficult for multi-buffer completion, but I guess you could just throw all of the suggestions from other buffers beneath the distance-sorted suggestions from the current one being edited.
+1
Agreed, I would find such an addition to the autocomplete system extremely time saving.   
+2
BIG vote of support for this feature. Would really help!
http://sublimetext.userecho.com/topic/49767-autocomplete-using-words-of-the-open-files-in-sidebar/

Similar post, but same concept. I'm upvoting both as I think whatever the best way to implement this is will probably be adopted.
My concern is about the performance and memory consumption of the editor. What is the impact when we have a big files opened?
+1
I imagine that will be considered as to whether this feature gets adopted. I imagine there are ways (batch processing through different sections of larger files, as well as tracking which sections are modified for autocomplete updates). It's currently already taking place regardless of big files or not (to my knowledge) so with the right measures put in place I don't think it would be a problem..

The only real matter is actually implementing it as such, I can't imagine it to necessarily be a simple matter; That's why Jon is the creator and not myself though :p
This would be great. +1
Using Michael explanation as base, I vote +1.
I would also find this feature very useful, all i would have to do is to have open a file with a list of words which i use frequently. This is the main feature which i miss from Vim. Sublime Text is a mixture of the bits i like from vim and bits which i like from TextMate.
Wondering if that could be taken further and adding that as a settings file? something to be loaded along with the autocomplete. That way you wouldn't have to open it so much as just keep it up to date. Or maybe an array for Global Settings for something.
+1
I'd like to see this feature, but ONLY for the current set of Open Files in tabs. And separation between Split Groups would be a nice level of control as well...
I'd definitely prefer only the current open files. Forcing it to only be in the current split group seems limiting, though -- what if you're editing two files side by side because they're related to each other? Wouldn't autocomplete be useful there?

That could be a setting in a preferences file, though, if people find it useful.
Agreed. Meant it as more of a "nice to have" as an extra level of control. (on top of the "all open files" default)
Yes! This is the way auto completion works in vim (looking at all open buffers) and it is really helpful.
Yes, the current auto complete is already much better then in TM, if i could take all open file that would be awesome!
Now migrating to Sublime from gedit with plugins, autocomplete based on the current open documents is what I miss the most!
Came from vim and miss this a lot. A must, IMHO. +1
I rely on this feature in Vim, and it's one of the Harpy Features that makes me bounce back to that editor on occasion. So if it existed in ST2, I'd be very happy.