Raimondi / delimitMate

Vim plugin, provides insert mode auto-completion for quotes, parens, brackets, etc.
http://www.vim.org/scripts/script.php?script_id=2754
1.98k stars 117 forks source link

jump out of block from any point #223

Closed perrin4869 closed 8 years ago

perrin4869 commented 9 years ago

This is a feature request. I think it would be amazing if you added the ability to jump out of a block from any point, not just at the end of it. For example:

(abcde|)

Jumping (by default with <C-Tab>) at that point would result in:

(abcde)|

What I would like is to have the same result if attempting to jump in this case too:

(ab|cde)

Of course, it would be great if it worked on blocks too:

{
abc|de
}

Jumped into:

{
abcde
}|

Thanks!

habamax commented 9 years ago

Have a look at https://github.com/habamax/vim-skipit It does the thing except it works for a line, but it is fairly easy to make it multilined.

perrin4869 commented 9 years ago

Nice!! Looks very promising :) I guess it's a good idea to separate the jumping feature from delimitMate, since I like the Unix philosophy of "Do One Thing and Do It Well". I'll be following your plugin, hope multilined feature comes soon! Thanks!

rembo10 commented 9 years ago

You can set delimitMate_jump_expansion = 1 and it'll jump out of the block when you type the closing bracket/parenthesis/etc