I was wondering if there’s a way to open multiples files with Vim, but each file on a specific line number. I explain :
I often use the syntax : vim my/way/too/far/file +120
in order to edit this file at line 120 because gcc told me too 🙂
Now what i’m looking for is a way to do this for multiples files at the same time!
Of course, vim file1 +xx file2 +xx … won’t work (the + option only affect first file … don’t ask me why)
So if anyone know a way to fix this? I didn’t found it in the manpage…
By the way, sometimes, file1 maybe the same file as file2 …
Here’s a way :
vim +6 file1 +"sp +3 file2".Change
sptotabnewif you prefer tabs.But it would be really useful only if someone could make a script with it…