Vim Tips Wiki
Register
(This directory was named: drive-download-20170825T130756Z-001)
 
(5 intermediate revisions by 4 users not shown)
Line 13: Line 13:
 
The command <code>:Explore</code> 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. (For example <code>:e /home/user</code> displays the contents of that directory.)
   
 
To return to the explorer window, press Ctrl-^ (usually Ctrl-6).
 
To return to the explorer window, press Ctrl-^ (usually Ctrl-6).
Line 28: Line 28:
 
map <F2> :!ls<CR>:e
 
map <F2> :!ls<CR>:e
 
</pre>
 
</pre>
  +
  +
==See also==
  +
* [[Set working directory to the current file]] - <code>:e /home/user</code> temporarily sets the directory that Vim is in
   
 
==References==
 
==References==
Line 35: Line 38:
   
 
==Comments==
 
==Comments==
I wonder if there is a way to navigate the files with case being insensitive after you Ctrl + D
+
I wonder if there is a way to navigate the files with case being insensitive after you press Ctrl-D
  +
  +
I have a bug with navigation: sometimes FileExplorer switching onto another buffers. I'm opening 2 buffers: the right panel is empty, the left panel: FileExplorer. I'm on the left. Type ":e /home/user". Then press "-" (go to up directory). Oops! FileExplorer switching me onto the right panel! :-( What is it?

Latest revision as of 06:00, 22 November 2017

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. (For example :e /home/user displays the contents of that 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

See also[]

References[]

Comments[]

I wonder if there is a way to navigate the files with case being insensitive after you press Ctrl-D

I have a bug with navigation: sometimes FileExplorer switching onto another buffers. I'm opening 2 buffers: the right panel is empty, the left panel: FileExplorer. I'm on the left. Type ":e /home/user". Then press "-" (go to up directory). Oops! FileExplorer switching me onto the right panel! :-( What is it?