vim-node icon indicating copy to clipboard operation
vim-node copied to clipboard

Can you make 'gf' work on whole `require` declarations instead of only its parameter?

Open adriangrigore opened this issue 10 years ago • 3 comments

For instance, I would like to be able to do 'gf' on a whole require statement (including var if possible), instead of jumping first to its parameter.

adriangrigore avatar Dec 03 '14 00:12 adriangrigore

:+1:

bahamas10 avatar Mar 13 '15 17:03 bahamas10

+1

scien avatar Mar 20 '16 18:03 scien

You can just remap to a command that will go to the start of the line, then finds the first quotation character, then executes the jump:

nnoremap gl ^f'gf

nicksergeant avatar Jun 07 '17 02:06 nicksergeant