Drag and drop file names into the Vim command line
From Vim Tips Wiki
(Redirected from VimTip413)
Tip 413 Previous Tip • Next Tip
Created: January 29, 2003 Complexity: basic Author: Thomas Ramming Minimum version: 6.0 Karma: 25/20 Imported from: Tip#413
You can open files in VIM by Drag&Drop of selected file names from Windows Explorer.
This also works by dropping into the VIM command line, so you can e.g. type
':split '
then drag&drop a selected file to VIM window and hit <CR>
The complete path and filename is transferred to commandline and the file is opened in a new VIM buffer/window.
[edit] Comments
This also works in an X-Windows environment, such as Linux uses.
:edit <drag file on to Gvim window> <Return> also works as you would expect.
In X, you don't even need to type ":edit" first. Just grab a file from your file manager (like Rox) and drag/drop it into Vim.
