<cr>.............Browsing...................................|netrw-cr|
<del>............Deleting Files or Directories..............|netrw-delete|
-................Going Up...................................|netrw--|
a................Hiding Files or Directories................|netrw-a|
mb...............Bookmarking a Directory....................|netrw-mb|
gb...............Changing to a Bookmarked Directory.........|netrw-gb|
cd...............Make Browsing Directory The Current Dir....|netrw-c|
d................Make A New Directory.......................|netrw-d|
D................Deleting Files or Directories..............|netrw-D|
<c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
i................Change Listing Style.......................|netrw-i|
<c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
o................Browsing with a Horizontal Split...........|netrw-o|
p................Use Preview Window.........................|netrw-p|
P................Edit in Previous Window....................|netrw-p|
q................Listing Bookmarks and History..............|netrw-qb|
r................Reversing Sorting Order....................|netrw-r|
< (etc)
The <F1> key thus brings you to a netrw directory browsing contents help page.
It's a regular help page; use the usual |CTRL-]| to jump to tagged help items
and |CTRL-O| to jump back.
To select files for display and editing: (with the cursor is atop a filename)
<enter> Open the file in the current window. |netrw-cr|
o Horizontally split window and display file |netrw-o|
v Vertically split window and display file |netrw-v|
p Use the |preview-window| |netrw-p|
P Edit in the previous window |netrw-P|
t Open file in a new tab |netrw-t|
The following normal-mode commands may be used to control the browser display:
i Controls listing style (thin, long, wide, and tree).
The long listing includes size and date information.
s Repeatedly pressing s will change the way the files
are sorted; one may sort on name, modification time,
or size.
r Reverse the sorting order.
As a sampling of extra normal-mode commands:
cd Change Vim's notion of the current directory to be
the same as the browser directory. (see
|g:netrw_keepdir| to control this, too)
R Rename the file or directory under the cursor; a
prompt will be issued for the new name.
D Delete the file or directory under the cursor; a
confirmation request will be issued.
mb gb Make bookmark/goto bookmark
One may also use command mode; again, just a sampling:
:Explore [directory] Browse specified/current directory
:NetrwSettings A comprehensive list of your current netrw
settings with help linkage.
The netrw browser is not limited to just your local machine; one may use
urls such as: (that trailing / is important)
:Explore ftp://somehost/path/to/dir/
:e scp://somehost/path/to/dir/
See |netrw-browse| for more.
==============================================================================
*22.2* The current directory
Just like the shell, Vim has the concept of a current directory. Suppose you
are in your home directory and want to edit several files in a directory
"VeryLongFileName". You could do: >
:edit VeryLongFileName/file1.txt
:edit VeryLongFileName/file2.txt
:edit VeryLongFileName/file3.txt
To avoid much of the typing, do this: >
:cd VeryLongFileName
:edit file1.txt
:edit file2.txt
:edit file3.txt
The ":cd" command changes the current directory. You can see what the current
directory is with the ":pwd" command: >
:pwd
/home/Bram/VeryLongFileName
Vim remembers the last directory that you used. Use "cd -" to go back to it.
Example: >
:pwd
/home/Bram/VeryLongFileName
:cd /etc
:pwd
/etc
:cd -
:pwd
/home/Bram/VeryLongFileName
:cd -
:pwd
/etc
WINDOW LOCAL DIRECTORY
When you split a window, both windows use the same current directory. When
you