There must be a way, something like this:
vim -[option] <file-list>
to open files from command prompt and not from within Vim.
- split windows vertically or/and horizontally
- in separate tabs
|
There must be a way, something like this:
to open files from command prompt and not from within Vim.
|
|||
|
|
|
I'm assuming you mean from the command line. From
So type this to open files split horizontally, for example:
|
|||||||||
|
|
Ctrl-W s for horizontal splitting Ctrl-W v for vertical splitting Ctrl-w q to close one |
|||||||||
|
|
While running vim:
|
|||||||||||
|
|
another interested trick is the CLI -p argument - which opens them in separate tabs for recent versions of vim and gvim.
|
|||
|
|
|
Another useful trick that I just found out, is that you can use wildcards in the filelist to open multiple files. Say you want to open file1.txt, file2.txt, and file3.txt all in separate tabs but don't feel like typing that all out you can just do:
I frequently find myself needing to open a lot of files with a similar prefix, and this has been quite helpful |
|||