vim DelimitMate

The idea of these auto-closing plugins (like the original feature implementation found in IDEs like Eclipse) is that you just type the closing character to go over it. The plugin should detect this situation and instead of inserting the character jumps over the existing, auto-inserted one.

If that's not working for you, there are several plugin alternatives on offer. The Vim Tips Wiki has a list of them.


With delimitMate, Shift-tab will jump out of the current delimiter and Control-G g will get you out of nested delimiters. No need to remap anything.


You could try auto-pairs's Fly Mode

eg:

( hello| world )

press ) at |

( hello world )|

If jump incorrect, use <M-b> to do the back insert.

eg:

(hello| world()

press ) at |

(hello world()|

press <M-b>

(hello)| world()

Repository: https://github.com/jiangmiao/auto-pairs

Plugin: http://www.vim.org/scripts/script.php?script_id=3599

add

let g:AutoPairsFlyMode=1 

to .vimrc to turn Fly Mode on

Tags:

Vim