History Report a problem
Article Edit this page Discussion

Drag and drop file names into the Vim command line

From Vim Tips Wiki

(Redirected from VimTip413)
Jump to: navigation, search

Tip 413 Previous TipNext 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.


Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Pixar
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Flash Gordon
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Drag and drop file names into the Vim command line"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation


.