there must be vim -[option] file-list to open files in FROM COMMAND PROMPT and NOT from within VIM
- split widows vertically or/and harizontally
- in separate tabs
assume I am using vim 7.2
there must be vim -[option] file-list to open files in FROM COMMAND PROMPT and NOT from within VIM
assume I am using vim 7.2
While running vim:
:sp filename (horizontal)
:vsp filename (vertical)
I'm assuming you mean from the command line. From vim --help
:
-o[N] Open N windows (default: one for each file)
-O[N] Like -o but split vertically
So type this to open files split horizontally, for example:
vim -o3 file1.txt file2.txt file3.txt
Ctrl-W s for horizontal splitting
Ctrl-W v for vertical splitting
Ctrl-w q to close one
another interested trick is the CLI -p argument - which opens them in separate tabs for recent versions of vim and gvim.
gvim -p file1.txt file2.txt
This question is also asked on SuperUser, and shows how to do it and split horizontally and vertically at the same time!