Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know about vins command line operator but I need a version that works on multiple files .

For instance I have a stack trace file and would like it to open all of the files to the line in a different buffer

share|improve this question
Maybe a silly question, but why not use a debugger for that? – user13742 Apr 3 '14 at 17:58
There's a number of solutions on so – Matt Apr 3 '14 at 17:59

To go to line 3 on file1.txt and line 4 on file2.txt I do this:

vim -c ":e file1.txt|:3|:e file2.txt|:4"
share|improve this answer

With the file:line - Allows you to open file:line and it does the right thing plugin, you can use

$ vim foo.c:123 bar.c:456
share|improve this answer

This will open the specified files and to to the specified line (to wit: line 123) in all specified files:

vim -p +'tabdo 123' /path/to/somefile /path/to/some/otherfile
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.