How can I go to end of parenthesis/brackets/quotes without switching insert mode in Vim?

A plugin would be overkill. Add this mapping to your ~/.vimrc:

inoremap <C-e> <C-o>A
  • <C-o> is used to issue a normal mode command without leaving insert mode.
  • A, well… you know what it does.

If you install the delimitMate plugin you can achieve this with the <S-e> or <C-g>g mapping.


I'm use to using Tab to jump out of things like parenthesis, curly braces, etc., so I just made a simple mapping to Shift+Tab that simply moves the character 1 character to the right from INSERT mode. Here's my simple mapping that seems to be just fine for my purposes.

inoremap <S-Tab> <esc>la

Edit: It seems that delimitMate has this same mapping (Shift+Tab) for jumping over a closing delimiter. I think i'll just use that since I already use delimitMate.

Tags:

Vim