I often jump from a file to file, while working a large codebase. I typically do this by way of putting cursor on the file, say foo.h, and typing "gf". I wonder if I can do the same thing, yet open the file in a split window.
One obvious solution is to simply type: vsp (sp) filename.
<c-w>gf open in a new tab (Ctrl-w gf)
<c-w>gf
Ctrl-w gf
<c-w>f for split window <-- this is the answer you are seeking (Ctrl-w f)
<c-w>f
Ctrl-w f
source: http://vim.wikia.com/wiki/Open_file_under_cursor
2.1m questions
2.1m answers
60 comments
57.0k users