DEV Community

Discussion on: So, you want to open two files in vim?

Collapse
 
moopet profile image
Ben Sinclair

You can also use -O for vertical splits, and if you omit either flag (and presumably have hidden set), you will open them in hidden buffers, so you can navigate with :ls, :b <n> and :next and so on.

You can open all your buffers in splits at any time with the best command in Vim: :vertical ball.

Collapse
 
fernand0 profile image
Fernando Tricas García

Nice, thanks. For thist matter I prefer using horizontal split but sometimes vertical is useful also.