gVim: How to open multiple files in its own tab at once?
in most GUI text editor I can use ctrl click to open multiple files at once.
I can't do that in gvim.
What the gvim way to do it?
Tnx.
-edit- ...using gui way instead of command line.
Solution 1:
Easy:
gvim -p file1.c file3.c ...
or:
gvim -p *.c
Solution 2:
gVim opens multiple files in buffers.
:tab ball
will open these buffers in their own tabs. I guess you could add this command to your _vimrc to make it happen each time gvim runs.
In Windows: gvimext.dll: Support loading files into a VIM tab
- Select multiple files (with CTRL-Click)
- Right-Click to get context menu
- Click "Edit with single Vim using tabs"
Solution 3:
This is a partial registry fix (selecting multiple files and right-clicking Edit with gVim opens those files in different tabs in the same window)
[HKEY_CLASSES_ROOT\Applications\gvim.exe\shell\edit\command]
@="C:\\Program Files\\Vim\\vim70\\gvim.exe --remote-tab-silent \"%1\""
Solution 4:
You can open multiple files in gvim. After you've selected the files you want to open, right-click and select "Edit with single Vim". Vim will initially display only the first file, but all the file names are in Vim's argument list. Execute
:n
to open each file in the list one at a time (:N
to go back), or
:all
to see all the files at once, each in a different Vim window, or
:tab all
to see each in a different tab.
Solution 5:
-
Open files:
vim {file1,file2,...}
in buffers, then use
:ls (list), :n (next), :p (previous), :b<N> (open file N), :b [press TAB]
-
Open in tabs:
vim -p <files>
as polemon wrote, then use same commands as above
-
Open in multiple windows :
vim -o {file1,file2,...}
Then see e.g. http://www.cs.oberlin.edu/~kuperman/help/vim/windows.html