Can I force gVim to open dragged-in files in a new tab? Can I force gVim to open dragged-in files in a new tab? windows windows

Can I force gVim to open dragged-in files in a new tab?


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.