sponsor Vim development Vim logo Vim Book Ad

file:line : Allows you to open file:line and it does the right thing :-)

 script karma  Rating 268/82, Downloaded by 2392    Comments, bugs, improvements  Vim wiki

created by
Victor Bogado da Silva Lins
 
script type
utility
 
description
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. With this little script in your plugins folder if the stuff after the colon is a number and a file exists with the name especified 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 and you can contribute to it on github at https://github.com/bogado/file-line .
 
install details
Just copy the file into your plugins path ($HOME/.vim/plugin under unixes).
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
file_line.vim 1.0 2012-02-09 7.0 Victor Bogado da Silva Lins - better support for windows
- allows copy and paste from grep results (making the line parameter optional)
- center the cursor line (thanks Dmitri Louchtchenko)
- better fold management (thanks Dmitri Louchtchenko)
file:line.vim 0.6 2011-01-26 7.0 Victor Bogado da Silva Lins Added some changes made by Ingo Karkat that made the whole thing more robust.
file:line.vim 0.5 2011-01-19 7.0 Victor Bogado da Silva Lins following Dr. David Alan Gilbert suggestion of allowing file:line:column format.
file:line.vim 0.4 2008-08-18 6.0 Victor Bogado da Silva Lins Closes the buffer for the nonexistent file "file:line" after it opens the correct file.
file:line.vim 0.3 2008-03-11 6.0 Victor Bogado da Silva Lins Opens eventual folds on the desired lines. Changes made by Rodolfo Borges (user barrett9h)
file:line.vim 0.2 2008-03-07 6.0 Victor Bogado da Silva Lins This version uses a simpler way to open the desired file and also uses the "nested" option so the loaded file can be correctly detected by vim.
file:line.vim 0.1 2008-03-07 6.0 Victor Bogado da Silva Lins Initial upload
ip used for rating: 174.129.103.100

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo