On MS Windows using gVim, is it possible to select several files from the explorer and open them in the same instance of gVim in different buffers?
At the moment if I select 3 different files on Windows graphical explorer and press enter they get open in 3 different instances of gVim. What I want is to open them in the same instance.
When I work on linux and I want to edit all the files of a directory with vim I can simply from command line do the folowing:
$ vim ./*.sh
This will open all the files in the same instance of vim in different buffers. I'm looking for a way to do the same but from Windows GUI with gVim.
Note 1: Using MS Windows command line is not an option here neither is using a cygwin console.
Note 2: I know that I can open only one file and then, from gVim open the others but that would be slower than simply openning them all in one time from GUI.
Note 3 (edit): Out of curiosity I just tried to do it on a Debian Jessie with a gVim 7.3 and it worked as I want (one instance - several buffers) out of the box with the same .vimrc
as the one of the windows machine (without any .gvimrc
file). So I deduce that:
- It is possible to do what I want.
- The behavior of gVim depends on the OS running it which is a little bit disturbing.
gvim file1
andgvim file2
). However, the filemanager you used on Debian may invoke gvim only once with all the files in the argument list (gvim file1 file2
). The difference in behaviour is not in gVim as such, but in how it is invoked...