Searching in the current buffer (and included files)

1 Point

Romain Lafourcade Romain Lafourcade

4 years ago

"Searching", not "jumping around".

" lists lines containing the word under the cursor
" type the line number followed by <CR> to jump
" to the corresponding line
nnoremap [I [I:
xnoremap [I "vy:<C-u>ilist /<C-r>v<CR>:

" populates the command-line with this stub
nnoremap ,I :ilist /

" same as above but for 'defines'
nnoremap [D [D:
xnoremap [D "vy:<C-u>dlist /<C-r>v<CR>:

" populates the command-line with this stub
nnoremap ,D :dlist /

" Oh! And don't forget this beauty:
:g/foo/#