darkfeline
darkfeline

Reputation: 10662

How to type two left braces in vim with Latex-Suite?

When I type two left braces {{, Latex-Suite expands them into \left\{ \right\}<++>. I use markers to organize my files, so needless to say this is very vexing. Does Latex-Suite provide a way to type two left braces, or is there a way to temporarily toggle its bindings?

Upvotes: 4

Views: 641

Answers (3)

skeept
skeept

Reputation: 12413

You can also just simply add a imap to do this for you:

inoremap \{{ {{

If you define it this way it won't expand the braces in the imap definition, it will just insert the braces.

Upvotes: 2

Ingo Karkat
Ingo Karkat

Reputation: 172590

You can avoid the triggering of the mapping defined by the Latex-Suite by inserting the second brace literally via <C-v> (often remapped to <C-q> on Windows): {<C-v>{.

Upvotes: 2

Jan
Jan

Reputation: 5162

You can disable this function globally by commenting out the line

call IMAP ('{{', '\left\{ <++> \right\}<++>', "tex")

in the main.vim of the vim latex plugin.

In my case, it was line 62 in my ~/.vim/ftplugin/latex-suite/main.vim .

Btw., I have taken this opportunity to also disable the function called when typing $$.

Upvotes: 3

Related Questions