Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

There's one particular feature I really like about TeXShop. It's the ability to type something like \bali + escand you get the entire \begin{align} structure or try typing something like \bite + esc. It's definitely very convenient.

I know that these things can be done with other editors via keyboard shortcuts, but I don't want to have to memorize a new keyboard shortcut (plus, I already have many that I use).

So my question is, is it possible to recreate this with other editors such as vim or TeXStudio?

Update: I'm running Mac OSX. To help you help me, I've listed some other mac compatible editors that community users may be familiar with:

  • texstudio
  • vim with latex suite
  • texlipse
  • sublime
share|improve this question

marked as duplicate by Speravir, mafp, Thorsten, Werner, T. Verron May 6 '13 at 5:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
See in LaTeX Editors/IDEs for “code completion”. –  Speravir May 5 '13 at 22:27
    
Give Texmaker a look. It has some as well. –  BoZiffer May 6 '13 at 2:31

2 Answers 2

You could try TeXnicCenter.

It has some autocomplete (by pressing CTRL SPACE) after writing:

ite

\begin{itemize}
    \item 
\end{itemize}

figu

\begin{figure}%
\includegraphics[width=\columnwidth]{filename}%
\caption{}%
\label{}%
\end{figure}

tabl

\begin{table}%
\begin{tabular}{lcr}

\end{tabular}
\caption{}
\label{}
\end{table}

And so many more! You should really give it a try.

Related posts:

LaTeX Editors/IDEs

share|improve this answer
    
Ah, I'm sorry. I forgot to mention I was on osx. But I've upvoted you for your time anyhow. –  AlanH May 5 '13 at 21:51

Well, basically, Emacs shortcuts are similar to whatever you want them to be;). That said, expanding just \bali (and not things like \bali + space, \bali + tab etc.) might be dangerous; how would you type a control sequence starting with \bali?

If \bali + space is good for you, Abbrev mode is a ready-made solution you may use. If you want to have the point (cursor in Emacsspeak) in a particular place in the expanded text (like between the \begin...\end pair), Abbrev mode is not sufficient; then, you might want to look into Yasnippet. In it, you have a way to create snippets of code, expandable either by a keystroke, or by an abbreviation followed by TAB (but you can easily change it into SPACE, or even a few different and independent keys - though I didn't test these ideas).

share|improve this answer
    
I made the assumption people knew it would be \bali + esc. Will using Yasnippet create any conflicts or issues? –  AlanH May 5 '13 at 21:54
1  
abbrevs can also be used without the abbrev mode by triggering the expand-abbrev function, and you can bind this to your favorite key (combination). –  alexurba May 5 '13 at 22:14
    
@AlanH: well, escape is a strange choice; it is possible, but ESC is used in Emacs as a prefix, so that you may use ESC and then x instead of M-x (that is, Alt+x). But if you bind ESC to expand-abbrev (as alexurba hints), you're fine. (Well, you have also to remember that abbrevs may use only word-constituent characters, so you'd have to change the syntax class of the backslash). Put together: I'd rather switch my habit to another keystroke, it's not that hard. But if you really want to have it your way - Emacs will let you. –  mbork May 6 '13 at 21:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.