Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
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 '13 at 14:39
add comment

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.

share|improve this answer
    
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 '13 at 14:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.