The vim command [I
shows a list of declarations. How to do I navigate to one of the items in this list?
views:
117answers:
3
+1
A:
As far as I know (and by briefly glancing at the manual) - that's not possible with those particular commands available.
However, you can use :vimgrep to sort of achieve what you're after e.g.:-
:vimgrep <C-R><C-W> %
And then just use the quickfix list to browse the matches as normal:-
:copen, :cnext, :cprev, etc.
Gavin Gilmour
2010-03-30 21:04:31
A:
Take note of the line numbers. You can use 100G
to jump to line 100, 500G
will jump to line 500, etc.
You could also just press *
repeatedly to move through the matches (or #
to move backwards).
too much php
2010-03-31 00:47:05
+1
A:
Hi,
The following snippet might be what you are looking for. It shows the list of declarations by [I and asks you in the same step to enter the number of the item you want to jump to:
nnoremap [I [I:let nr = input("Item: ")if nr != ''exe "normal " . nr ."[\t"endif
Greetings,
Jan Christoph
Jan Christoph Ebersbach
2010-04-03 16:27:25