Wikia

Vim Tips Wiki

Move files with a Vim command

Talk0
1,599pages on
this wiki
Revision as of 05:19, October 10, 2012 by Fritzophrenic (Talk | contribs)

Recently created tip

We have not yet decided whether to keep this tip as its own page or merge it somewhere else. If you have a suggestion on the tip content, please edit this page or add your comments below (do not use the discussion page).

Please discuss whether to keep this as a new tip, or whether to merge it into an existing tip, on the new tips discussion page.
created December 13, 2011 · complexity basic · author Antonio Carlos De Souza · version 7.0

You don't need a shell window to move a file. Vim has an integrated file explorer you can use for file operations. Vim's file explorer can be acessed using :Explore in normal mode (or just enter :e. which is a command to edit the current directory). It should list files in the current directory.

Contents

How to

In normal mode type :Sex to split the current window and open Explore above it. Or :Sex! to split vertically. If the current window has no file, the current directory is opened (as shown by :pwd). (Also see :Hex, :Vex, and :Tex commands for slight variations).

Navigate to a file name using hjkl, or arrow keys.

Press R to rename a file.

A prompt is shown that the selected file will be moved (renamed), and the original full path for the destination is shown. Change that path as wanted and press Enter to move the file, or Esc to cancel.

Comments

References

Comments

Advertisement | Your ad here

Photos

Add a Photo
103photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki