I remembered the old gF trick that works great.
Shameless break with vim tips:
The following commands open the file with the cursor on the specified line number:
gF open in the same window <cw>F open in a new window (Ctrl-w F) <cw>gF open in a new tab (Ctrl-w gF)
When such file name / line number pairs result from compiling code, the following commands are also useful:
:help :cn :help :cl :help :cfile
The file: line plugin allows you to use combinations of the file name and line number, for example global.h: 123, as an argument to Vim. When you open the file: line, the script checks if the file exists and the line is a number. If so, Vim opens the file with the correct line number.
stefgosselin
source share