# IDE with AutoCompletion?

I was looking for an Latex editor that has an auto completion function. Is there any available?

I thought about auto complete suggestion for common commands like for example defining chapters and sections etc.

-
TeXworks, Kile, WinEdt, VIM, Emacs and many others. –  Leo Liu Mar 10 '11 at 10:24
List of LaTeX IDEs –  Seamus Mar 10 '11 at 13:20
@Leo Editting any file not with vim would be a pain. How does vim achieve the autocompletion? –  Covi Mar 11 '11 at 10:57
@Thanks for all the answers. I realized now that I should have asked how does autocompletion work in TexWorks ad not which IDE supports autocompletion. –  RoflcoptrException Mar 11 '11 at 11:50

Here is a list of LaTeX IDEs

While emacs+AucTeX doesn't have "autocompletion" per se but it does have something that performs the same role, and performs it better (obviously).

Let's take the example of adding section headings. With autocompletion I start writing \sec... and then press TAB or some such autocomplete key.

With emacs, you press Ctrl+C and then Ctrl+S and emacs asks you what level of sectioning you want. You type sec... and then TAB to autocomplete. Then emacs asks you how you'd like to label that section (I want to call this section foo). It automatically adds a \label{sec:foo} below your \section command.

Fine. But here's the really useful part. Let's say you want an environment: Ctrl+C then Ctrl+E. Then emacs asks you what kind of environment you want. And if you tell it you want an environment emacs understands, like minipage it will ask you for its compulsory arguments (width, for minipage). It will then create the environment and put you between the \begin and \end tags.

More cool features of emacs: abbrev-mode which is basically auto-complete on magic!

And the smart  : Typing  then a gives you \alpha likewise for other greek letters.  then pressing the right arrow key gives you \rightarrow Likewise for other arrow directions...

Also, you get like, 100 geek points just for using emacs. Fact.

-
It's worth mentioning that emacs's abbrev mode (ie. autocompletion) will complete any word, not just LaTeX macros, which is very handy if you use a lot of long words. Its sibling, dabbrev mode, can automatically fix typos like "teh" and do other useful and fully automatic text replacement. –  Ross Duncan Mar 11 '11 at 14:16
@Ross Thats a good point. I don't use abbrev mode much myself... –  Seamus Mar 11 '11 at 15:10
in emacs [Ctrl+c] then [Ctrl+m] will prompt you for the name of a macro, hit tab, and it will autocomplete (in the minibuffer). There is probably a way to add this directly to the [tab] key after typing . –  Mortimer Mar 11 '11 at 15:19
It's not nearly as well-developed as AucTeX, but Ultra-TeX mode for Emacs does autocompletion: hit the backslash key, and it starts completing on TeX commands, using a list constructed by the user (although Ultra-TeX comes with a starter list) and also from "newcommands", etc., in the current document. –  John Palmieri Mar 11 '11 at 19:48

You did not specify your OS, but if you're running GNU/Linux, you should have a look at Kile, which does that to some extent. Here's a screenshot illustrating that feature.

-
Kile theoretically can be compiled and run on Windows as well. –  David Z Mar 11 '11 at 19:55
"To some extent"? Kile is amazing in that it even recognizes macros I defined myself and knows how many parameters they take. ... sometimes at least, so ... yeah, maybe "to some extent" was accurate. –  Christian Jan 24 '13 at 19:37

Multiplatform TeXworks has autocomplete (using tab). Texmaker and TeXlipse (Ctrl+space) have it and are multiplatform as well. I am hard pressed to think of any that do not offer it.

-

TexnicCenter in windows also has a completion function with Ctrl+space and additional custom commands can be added in xml files in the TexnicCenter program folder

-

TeXworks has some builtin autocompletion, but take a look at the script autocompleteForTexworks. The script can perform completion on long words earlier used in your document, labels and filenames for \input, \include and \includegraphics` macros.

There is a video of it in action on youtube.

Guide to use.

1. start typing the long word that should be autocompleted
2. press Crtl + M and the autocompleter will complete the word or at least make a suggestion for a completion.
3. if not satisfied with the suggestion press Crtl + M until the correct word is found.

Disclaimer: I'm author of the autocomplete script.

-
I can't use the scripts. I copied the files based on the instruction, but as I hit the Reload button, it does not recognize the two JS files. Any idea why? Thank you. –  Vahid Jan 24 '13 at 18:37