file-line is a plugin for Vim that enables opening a file in a given line.
If you use vim-plug, then add the
following line to your
Or use some other plugin manager:
When you open a
file:line, for instance when coping and pasting from an error
from your compiler vim tries to open a file with a colon in its name.
vim index.html:20 vim app/models/user.rb:1337
With this little script in your plugins folder if the stuff after the colon is a number and a file exists with the name specified before the colon vim will open this file and take you to the line you wished in the first place.
This script is licensed with GPLv3.