1

In vim, you can open a file with the cursor in particular line

Example: open file.txt with the cursor over the line 10

vim file.txt +10

With -O you can open the same file with vertical split

vim -O file.txt file.txt

How can I open the same file with a vertical split and with the cursor over specific lines?

something like

vim -O file.txt +10 file.txt +20

1 Answer 1

1

Please use following command vim +20 file.txt +"vsplit +10 file.txt"

Switch window with CTRL+w l (CTRL+w h)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .