With the DelimitMate, it auto generates the closing parentheses. When I'm finished typing inside the parenthesis, what key strokes do I press to quickly go to the right of the closing parenthesis? (Right now I have to manually press ESC then 'a')
You can do a custom map. I guess you want to go to the right of the closing parenthesis while you're in
insert mode. Just add to your
.vimrc this mapping:
:inoremap <F8> <ESC>f)a
In this way, while your in
insert mode and you've finished to write inside the parenthesis, F8 will bring your cursor ad the right of the closing parenthesis.
If you want you can change the mapped key, using another key instead of F8.
As Kent said in the comment a more general solution would be:
:inoremap <F8> <ESC>%%a
Which will work for
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.
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
( hello| world ) press ) at | ( hello world )|
If jump incorrect, use
<M-b> to do the back insert.
(hello| world() press ) at | (hello world()| press <M-b> (hello)| world()
to .vimrc to turn Fly Mode on
I kinda agree with Atropo on this one: if you want to stick with DelimitMate then the least disruption to your workflow might be to make a custom imap to get to the other side of the auto inserted character.
Personally I prefer to have more control over where/when the characters are auto-inserted, and how I can navigate around the auto-inserted characters; UltiSnips or SnipMate does that for me. Maybe they're more what you're looking for.
If you typing on a new line, you try
A which will append text at the end of the line.
I have autoClose installed. what I am doing currently is ("I" is cursor)
- (xxxxI) - ( xxxxI ) - ( xxxxIxx ) - text (xxxxI) other text - text ( xxxxI ) other text - text ( xxxxIxx ) other text
I just make a mapping, to
<esc>%%a then in above case, the cursor will move to
it doesn't work for quotes.
A little late to the party, but note that it can be done easily without any custom mappings. In insert mode, you can press
<C-O> (a default mapping) to enter a "one shot" normal mode where you can enter a single normal mode command.
So to answer your question, what you could do is