A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged


vim [file] +50 +split to split horizontally vim [file] +50 +vsto split vertically


You are so close: :split +50 fnord.txt All commands in vim that create new buffer has prototype: cmd [++opt] [+cmd] [file] All commands in vim that write buffer to your disk has prototype: cmd [++opt] [file] :h ++opt is only used for special options that should be set before read or write a buffer. :e ++fileformat=dos file :e ++encoding=latin1 file :e ...


:split file | :50 should work, from command line. The separator separate commands. A number typed as command jumps to that line number.


After you press : you got into cmdline-mode. And there's no direct way back into Visual from it (except normal! gv and such, but that's indirect through Normal). See :h mode-switching, because it's essential to understand how Vim works. Therefore, you must do it in a different manner: while still in the Visual yank the selection and put it into the command ...

Top 50 recent answers are included