Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 978
darkfeline Avatar asked Oct 28 '25 07:10

darkfeline


2 Answers

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 $$.

like image 131
Jan Avatar answered Oct 30 '25 07:10

Jan


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.

like image 25
skeept Avatar answered Oct 30 '25 08:10

skeept