On 03/13/12 08:29, Dotan Cohen wrote:
This expression will go back to one of the character pairs:
?\({}\|[]\|()\|""\|''\)

However, is there any way to restrict it to the current line?

Your mapping could include the line, something like (untested)

:nnoremap <f4> ?<bslash>%<c-r>=line('.')<cr>l\({}\|[]\|()\|""\|''\)<cr>

which populates the /\%l atom with the current line-number making use of control-R to insert the result of evaluating an expression (in this case, calling line() to get the current line#).

  :help /\%l

You might also be interested in adding "><" to your list of search items as your link suggests you might want to land at a tag junction. Also, you could shift your destination with an offset if you land one before/after your desired location:

  :help {offset}

Hope this helps,

-tim




--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to