I'd like gVim to open files dragged into it to open in a new tab, instead of replacing the current file. This question is on the right track, but I'd like to be able to run multiple instances of gVim, just able to drag files to the window I want.
I'm running on Windows 7.
No you cannot, the default action on drag and drop is specified in the implementation of a windows application (OLE DoDragDrop). It has not been implemented to open dropped files in a new tab and thus won't. But gVim is open source... so you could submit a patch if you really want this :)
You can start by typing :tabe
and then drag and drop your file. I can't fully confirm this (I only have a mac) but I think this will end up with :tabe filename
displayed. You can then hit enter and off you go...
You could add the following in your .vimrc
autocmd BufReadPost * tab ball
This will open tabs for all buffers, including the newly dropped file. Notice it does so for all buffers, so also the ones already opened in gvim
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With