I'm trying to write a mapping that will let me move around 'common' insertion points in a line when in insert mode. For example, I have the delimitMate plugin - so typing a opening delimiter automatically closes the delimiter and puts me in between. Once I've typed the text that goes inside, I usually want to jump to the end of the delimiter and stay in insert mode. Taking this forward, for a function like below
$("#someid").live("someevent", function (param1, param2) {
What I'd like is a insert mode mapping that lets me jump to after the first of any of the following delimiter chars (quote, double quote, parens, and/or EOL) and cycle over these points.
Checked VIM documentation for search - the \%l operator allows to restrict over a specific line number. I tried \%.l (. being current line ) - but this doesn't work. Any ideas?
:exe "/\\%" . line(".") . "l[{}()\"':=\\[\\],]"
seems to work - but doesn't move the cursor to the match.