cannot jump when cursor is on line number
~/src/k8s.io/ingress-nginx/internal/ingress/controller/nginx.go:665
If cursor is on the 665, we cannot jump to the file with error
E447: Can't find file "665" in path
It would be much better if we can jump to the file even if cursor is at line/column number.
What is your vim version and os?
@wsdjeg
os: mac/linux
vim: NVIM v0.5.0-d5adc8c
https://github.com/wsdjeg/vim-fetch/blob/dd674b50b261275a6a75cab6929b7bb7c5c4acba/autoload/fetch.vim#L185
After cursor ':' . This is expended to :665~ Native vim gF also doesn't handle this correctly, but It would be helpful if this plugin can solve this.
function s:gF()
try
execute "normal! gF"
catch
try
execute "normal! bgF"
catch
execute "normal! bbgF"
endtry
endtry
endfunction
nnoremap gf :call <sid>gF()<cr>
Foolish workaround for this.
That means we should not use expand('<cfile>'), we should implement a new function to get the file path of under cursor.