[Tex/LaTex] the Vim Latex-Suite shortcut for inline math parenthesis

vimvim-latex

Vim Latex-Suite has shortcuts for typing \left( and \right) just by typing ((. What is the shortcut for typing \( and \)?

Best Answer

There is not one, but you can create it.

You can put these lines in your ~/.vim/ftplugin/tex.vim. (I put mine in ~/.vim/bundle/vim-latex/ftplugin/tex_latexSuite.vim instead, because I used neobundle to install the plugin).

:call IMAP('FD', '\[ <++> \]<++>', 'tex') 
:call IMAP('DF', '\( <++> \)<++>', 'tex')

So now each time I type in Insert Mode FD I get a display mode and DF an inline mode. Then I enter my expression and I type the typical shortcut Ctrl+J to continue typing my text.

For more info you can take a look in the documentation.

Related Question