vim interpret argument with colon(s) as filename:line:column -
Is it possible to configure VIM in such a manner that if I type
Vim filename: 123: 89
This file opens file name
in line 123 and column 89?
If not through VIM then hack with hack?
I'm not sure how to leave the column, but this is the convenience of my age, that's why I Use the "Jump Line" functionality to set up in your .bashrc
VIM = $ (vim) function vim {local args IFS = ': 'Read -a args & lt; & Lt; & Lt; "$ 1" "$ VIM" "$ {Args [0]}" +0 "$ {Args [1]}"}
It disputed Vim by :
, then creates a command line of the form
vim & lt; Filename & gt; + 0 to & lt; Line & gt;
To ensure that the default line number is zero, +0
a hack.
(If you are not using Bash, you can customize it in a script and put it in your own way, or translate it into your preferred shell language. Edit filename: with: colons
, use $ VIM
.)
Comments
Post a Comment