4

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?

darkfeline
  • 9,404
  • 5
  • 31
  • 32
  • It's a horrible misfeature. There are _at least_ two other ways to insert \left'd brackets that _don't_ keep messing up my equations. There are far more benign features that they let you disable in `tex.vim` … – Luke Maurer Feb 27 '14 at 23:16

3 Answers3

3

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

Jan
  • 4,932
  • 1
  • 26
  • 30
2

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

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • Well, if you're willing to have to think about it every time, you can always type both and then undo, or type `{ {` and then backspace the space. It's just obnoxious to work around. – Luke Maurer Feb 27 '14 at 23:17
2

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.

skeept
  • 12,077
  • 7
  • 41
  • 52