bogado / file-line

Plugin for vim to enabling opening a file in a given line
http://www.vim.org/scripts/script.php?script_id=2184
301 stars 61 forks source link

Jump to file_name:line_number from stack trace #80

Closed ayushxx7 closed 4 years ago

ayushxx7 commented 4 years ago

Is it possible to jump to a file:line_number if it was writer inside vim itself. Like for example, from a stack trace in the vim terminal, or if I write PageBase:75 inside a document, the gf or gF command moves me to the desired line number in the file?

I tried using this: https://github.com/wsdjeg/vim-fetch but it isn't working for me (The plugin is crashing)

ayushxx7 commented 4 years ago

I found a workaround for this. Step 1: add current directory and subdirectories in the path. For Windows, that would be:

set path=.\** "vim's find can search the directories recursively

Refer here for other operating systems. Step 2: Make vim understand that ':' is not part of the filename

set isfname-=: "jump to file:linenumber from stacktrace

After this gF works like a charm! 🥇