Vitaly Kushner
Vitaly Kushner

Reputation: 9465

how to open a file at a specific line in an existing vim window?

I can open file at a specific line in mvim (on OSX, gvim on linux etc) with mvim file_path +file_line

I can open file in an existing window by mvim --remote-tab file_path

but I can't combine the two. when I do mvim --remote-tab file_path +file_line I get 2 tabs, one for the file, and another for a new file named +file_line ;)

Upvotes: 3

Views: 245

Answers (1)

too much php
too much php

Reputation: 91078

Apparently --remote-tab can only take one +cmd and it must come first:

mvim --remote-tab +file_line file_path

See :help --remote

Upvotes: 4

Related Questions