posted by Germán M. Bravo , updated 2 months ago , 23
It'd be great to have intellisense or a more smarter more customizable autocomplete and be able to use some kind of source code introspection to show tooltips and autocompletes
FYI if you're coding in C/C++/ObjectiveC/ObjectiveC++ there's the SublimeClang plugin which does autocompletion: http://www.github.com/quarnster/SublimeClang
Checkout the SublimeCodeIntel plugin. It's a code intelligence plugin ported from Open Komodo Editor.

As of this comment, supports: PHP, Python, RHTML, JavaScript, Smarty, Mason, Node.js, XBL, Tcl, HTML, HTML5, TemplateToolkit, XUL, Django, Perl, Ruby, Python3


The guy who wrote Sublime-CodeIntel is the same guy who posted this suggestion.  You sent him to his own project. :D
I'd love to see .Net intellisense myself. I'd even consider it as a full editor replacement if that was the case.
As much as I'd like to see SublimeCodeIntel work, it just doesn't for a huge chunk of people and although they're developing v2, it doesn't seem like they're efforts are going towards making it function for that huge chunk.

ST2's lack of autocomplete is easily the biggest downside to ST2 and it sucks it isn't core. I know there's a core version, but it sucks. :(

Really hope CodeIntel pulls through and v2 works for everyone but I'm not holding my breath.
Try SublimeClang - it does auto-completion, hinting, and static code analysis while it's at it too. It requires a tiny hack to get it working on first install though (unless you're on OS X), which involves installing python2.6 and making a symlink to sublime's lib folder from it, giving it access to many more modules from it's plugin system.
It is a great editor, I have used it in php, pascal, ruby, perl, java, and c.  I still keep going back to my old editors.  I don't even really care about library completion just within a project would be enough.
Intellij PhpStorp and WedIde have one of the best intellisense I've used.
Autocomplete is for a multitude of reasons *not* a builtin feature. It requires a *lot* processing for every key press, and that processing only works for 1 language - it's a whole other system that needs to be fired up for other languages. Builtin support would make Sublime a beast. However, try with SublimeCodeIntel or SublimeClang. They both provide what you need. SublimeClang works for me, but requires some manual install steps. CodeIntel should work out of the box, but I haven't really used it. Anyway, due to the reasons noted above (extreme bloat, lack of portability, and the fact that the plugin system is designed for stuff like this), despite liking the functionality itself, I'm down voting this. I hope you understand.
I agree, I guess I really should knuckle down fork SublimeCodeIntel and help work out the issues.
Note the creator of SublimeCodeIntel is the creator of this request.
Eric: HAHAH! Oh god, didn't know that. Then try with SublimeClang! It's actually pretty good. (Just uses LLVM clangs analytic abilities for C, C++, ObjC and ObjC++. Won't help you with python and others, though... But where there is support, it provides completions, warning/error highlighting as you type, clang static analysis for things like potential memory leaks, and all those goodies. I modified it a bit to save some cpu cycles, though, as well as fix some annoyances... Haven't forked and made a pull request (yet), though)

I'm still certain about my original statement - A universal editor should not bundle more than syntax highlighting and some snippets. It's fine for IDE's that aren't designed to be extensible, and *only* support what it was designed to be thrown at, but even there it leaves a handicap, as the builtin versions usually have lots of holes (Visual Studio "Intellisense" or what it was called, can't find head or tail of the source tree at work for example, when I need to debug something on Windows)

Last note: I might pull down codeintel and see what should be wrong with it as well, but my time available for hobby-stuff is limited... So I can't guarantee progress in any near future

Any chance your tweaks are documented/posted/pastebinned anywhere? I love sublimeclang but it does seriously bog things down sometimes. I haven't really looked in to the choke points myself, though.


Auto-complete certainly isn't trivial, but it doesn't necessarily have to be inefficient either.

The problem with the current status quo is that there are multiple plugins (as you pointed out) with different behavior, using different mechanisms, and which aren't particularly easy to extend for new use cases.

What Sublime Text needs is a well designed API that will make adding proper completion possible. It _is_ possible to do this. You don't even necessarily need an IDE-level of integration. For example, Chocolat.app, a new text editor in the vein of Textmate/Sublime Text provides such an API here:


If only SublimeClang had Ruby and Rails support!
Heh, yeah... Well, there's the fundemental issue there of clang being for C languages. :P
I know, I just want something that does completion and error checking for Ruby and Rails and works properly :)
Oh yes, I agree - those features are nice. I was just jokingly making a pretty obvious statement!
... I'm commenting too much on Userecho.

I would love to see a generic API in Sublime Text for this. That way, people can write their own completion engines. That is, a project indexer should go into ST2. The Indexer should call out to 3rd party indexing engines that are available to figure out how to parse all the files. SublimeCodeIntel is a nice idea, but it doesn't seem to work for me anymore (using it for PHP, Javascript, CSS, and HTML).


This great plugin gives proper introspective autocomplete  for Python https://github.com/svaiter/SublimeJEDI


To help the developer implement this efficiently, it would be helpful for us to show some mockups of how we want this to look and exactly what/how the tooltip should contain inside of it in what contexts.

Also, the ability to have plugins provide the autocompletion text and do the parsing like SublimeJEDI posted above sounds excellent so that Sublime can do this correctly on a language-specific plugin parser basis.

Maybe there is a compromise to be made between a fully featured code intellisense and just plain nothing? Here is the idea:

Most of the time I don't need autocompletion to be 100% correct, instead I just want it to give me suggestions for methods and properties I intend to call anyway. If there are mismatches in the list, I don't care (in fact, at the moment Sublime provides me with the complete php function list, which is a huge 100% mismatch). It would be useful whenever I don't want to type the full method name each and every time I need it (90% of the time) or I don't know, how to write the method right (5% of the time).

Sublime Text already has a superfast File Indexing, which also comes into play when using the "Go To Definition" command. Although (especially for namespaced frameworks) there may be cases, when there are 2 or more file/class matches, I really wouldn't care, if Sublime would provide me with everything it finds in those files - much like invoking Quick File Search (Ctrl+P) immediately followed by a goto symbol (@) command.

The Plugin https://github.com/alienhard/SublimeAllAutocomplet... does provide similar functionality, with the difference, that it uses all opened files for autocompletion. I don't need the target files to be opened in the editor, but instead Sublime could just use all matching "Go to Definition" Files for autocompletion.

I know, there still are a lot of cases where autocompletion would fail (for example directly invoking methods upon other methods return values), but I think this scenario would cover most needs.