Vim Tips Wiki
Register
m (Rewieved)
(Change <tt> to <code>, perhaps also minor tweak.)
Line 3: Line 3:
 
|previous=1181
 
|previous=1181
 
|next=1183
 
|next=1183
|created=March 22, 2006
+
|created=2006
 
|complexity=basic
 
|complexity=basic
 
|author=orsenthil
 
|author=orsenthil
Line 11: Line 11:
 
|category2=
 
|category2=
 
}}
 
}}
The command <tt>:Explore</tt> opens the file explorer window.
+
The command <code>:Explore</code> opens the file explorer window.
   
 
Select a file or directory name and press Enter to open that file or directory.
 
Select a file or directory name and press Enter to open that file or directory.
Line 17: Line 17:
 
To return to the explorer window, press Ctrl-^ (usually Ctrl-6).
 
To return to the explorer window, press Ctrl-^ (usually Ctrl-6).
   
You can also "edit" a directory to explore that directory. For example, <tt>:e ..</tt> lists files in the parent directory.
+
You can also "edit" a directory to explore that directory. For example, <code>:e ..</code> lists files in the parent directory.
   
 
==Other approaches==
 
==Other approaches==
In normal mode, type <tt>:e</tt> then press Space and Ctrl-D. That will list file names in the current directory. You can type a name and press Enter to edit that file.
+
In normal mode, type <code>:e</code> then press Space and Ctrl-D. That will list file names in the current directory. You can type a name and press Enter to edit that file.
   
If, for example, you want a name that starts with "get" type <tt>:e get</tt> then press Tab repeatedly, or Ctrl-D to list all matches.
+
If, for example, you want a name that starts with "get" type <code>:e get</code> then press Tab repeatedly, or Ctrl-D to list all matches.
   
 
Another possibility is to use a mapping like this:
 
Another possibility is to use a mapping like this:

Revision as of 06:11, 13 July 2012

Tip 1182 Printable Monobook Previous Next

created 2006 · complexity basic · author orsenthil · version 5.7


The command :Explore opens the file explorer window.

Select a file or directory name and press Enter to open that file or directory.

To return to the explorer window, press Ctrl-^ (usually Ctrl-6).

You can also "edit" a directory to explore that directory. For example, :e .. lists files in the parent directory.

Other approaches

In normal mode, type :e then press Space and Ctrl-D. That will list file names in the current directory. You can type a name and press Enter to edit that file.

If, for example, you want a name that starts with "get" type :e get then press Tab repeatedly, or Ctrl-D to list all matches.

Another possibility is to use a mapping like this:

map <F2> :!ls<CR>:e

References

Comments