9

I just installed the vim latex-suite plugin. Whenever I type empty brackets, parentheses, or braces, I get an extra pair of them, and I am moved to the middle of the new pair and put into insert mode.

i.e. after typing

{}

I get

{}{}

with the cursor between the second pair of empty braces.

How can I disable this?

2 Answers 2

6

Checkout your vim setting of backspace via :set backspace?. If it doesn't contain start you should add this :set backspace+=start (help :h 'backspace') to get the expected behavior of vim-latex.

Honestly, I think this should be noted somewhere in the vim-latex documentation or even set automatically by the plugin since it relies on it.

1
  • 1
    thanks! This solved it! though I am also now using the let g:Imap_FreezeImap=1 to stop it from moving the cursor to between the braces.
    – Brian
    Mar 29, 2013 at 14:39
9

Normally, you should have {}<++>, where <++> is a placeholder where you can jump using Ctrl+J. It seems like the delimiters for placeholders have been replaced by {}. From the documentation of latexsuite, maybe you should verify the value of the variables Imap_PlaceHolderStart and Imap_PlaceHolderEnd to check whether these have respectively been changed to { and }. Maybe you could try adding the lines

let g:Imap_PlaceHolderStart='<+'
let g:Imap_PlaceHolderEnd='+>'

in your .vimrc. If you just want to get rid of the place holders, searching around, the question

What does <++> signify when using Vim LatexSuite?

normally should give you a way to do that. Finally, I personally didn't like the automatic text replacement functionality, and I put the line

let g:Imap_FreezeImap=1

in my .vimrc. This deactivates lots of features, however in your case, the behaviour of {} should go back to normal. This however does not deactivate the automatic placeholder insertion, since pressing Tab in a description environment will introduce a \item[<+label+>] <++> in the document, which may also be corrupted in your case.

1
  • Thanks, though I should have mentioned I already got rid of the placeholders via the answer to that <++> question. But I did end up using this to also get rid of the moving my cursor to between the typed brackets, which also solved the issue.
    – Brian
    Mar 29, 2013 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .