summaryrefslogtreecommitdiffstats
path: root/runtime/doc/pi_netrw.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-06-24 21:56:24 +0000
committerBram Moolenaar <Bram@vim.org>2008-06-24 21:56:24 +0000
commit446cb837a017fc1c1b144cb5c2a35cb90abfbbcf (patch)
tree6c1fe56f2db8d4adbeee792b181b0659c4d1f216 /runtime/doc/pi_netrw.txt
parent3577c6fafb77da5419cd1001dac56f204d480bdc (diff)
updated for version 7.2a
Diffstat (limited to 'runtime/doc/pi_netrw.txt')
-rw-r--r--runtime/doc/pi_netrw.txt2824
1 files changed, 1861 insertions, 963 deletions
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index e880aef868..68a0299ce6 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,93 +1,99 @@
-*pi_netrw.txt* For Vim version 7.1. Last change: 2007 May 08
+*pi_netrw.txt* For Vim version 7.2a. Last change: 2008 Jun 21
-----------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell, Jr.
-----------------------------------------------------
-*dav* *http* *network* *Nwrite* *netrw-file*
-*fetch* *netrw* *Nread* *rcp* *scp*
-*ftp* *netrw.vim* *Nsource* *rsync* *sftp*
+*dav* *ftp* *netrw-file* *Nread* *rcp* *scp*
+*davs* *http* *netrw.vim* *Nsource* *rsync* *sftp*
+*fetch* *netrw* *network* *Nwrite*
==============================================================================
-1. Contents *netrw-contents*
+1. Contents *netrw-contents* {{{1
1. Contents.............................................|netrw-contents|
2. Starting With Netrw..................................|netrw-start|
3. Netrw Reference......................................|netrw-ref|
- CONTROLLING EXTERNAL APPLICATIONS..................|netrw-externapp|
+ EXTERNAL APPLICATIONS AND PROTOCOLS................|netrw-externapp|
READING............................................|netrw-read|
WRITING............................................|netrw-write|
DIRECTORY LISTING..................................|netrw-dirlist|
CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
- VARIABLES..........................................|netrw-variables|
+ VARIABLES AND SETTINGS.............................|netrw-variables|
PATHS..............................................|netrw-path|
4. Network-Oriented File Transfer.......................|netrw-xfer|
NETRC..............................................|netrw-netrc|
PASSWORD...........................................|netrw-passwd|
5. Activation...........................................|netrw-activate|
-6. Transparent File Transfer............................|netrw-transparent|
+6. Transparent File Editing.............................|netrw-transparent|
7. Ex Commands..........................................|netrw-ex|
8. Variables and Options................................|netrw-var|
-9. Directory Browsing...................................|netrw-browse| {{{1
- Maps...............................................|netrw-maps|
- Exploring..........................................|netrw-explore-cmds|
- Quick Reference Commands Table.....................|netrw-browse-cmds|
- Netrw Browser Variables............................|netrw-browse-var|
- Introduction To Directory Browsing.................|netrw-browse-intro|
- Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
- Directory Exploring Commands.......................|netrw-explore|
- Refreshing The Listing.............................|netrw-ctrl-l|
- Going Up...........................................|netrw--|
+9. Browsing.............................................|netrw-browse|
+ Introduction To Browsing...........................|netrw-intro-browse|
+ Quick Reference: Maps..............................|netrw-browse-maps|
+ Quick Reference: Commands..........................|netrw-browse-cmds|
+ Bookmarking A Directory............................|netrw-mb|
Browsing...........................................|netrw-cr|
- Obtaining A File...................................|netrw-O|
- Change Listing Style...............................|netrw-i|
- Making A New Directory.............................|netrw-d|
- Deleting Files Or Directories......................|netrw-D|
- Renaming Files Or Directories......................|netrw-move|
- Hiding Files Or Directories........................|netrw-a|
- Edit File Or Directory Hiding List.................|netrw-ctrl-h|
Browsing With A Horizontally Split Window..........|netrw-o|
- Browsing With A Vertically Split Window............|netrw-v|
Browsing With A New Tab............................|netrw-t|
- Preview Window.....................................|netrw-p|
- Selecting Sorting Style............................|netrw-s|
- Editing The Sorting Sequence.......................|netrw-S|
- Reversing Sorting Order............................|netrw-r|
+ Browsing With A Vertically Split Window............|netrw-v|
+ Change Listing Style...............................|netrw-i|
+ Changing To A Bookmarked Directory.................|netrw-gb|
Changing To A Predecessor Directory................|netrw-u|
Changing To A Successor Directory..................|netrw-U|
Customizing Browsing With A User Function..........|netrw-x|
+ Deleting Files Or Directories......................|netrw-D|
+ Directory Exploring Commands.......................|netrw-explore|
+ Exploring With Stars and Patterns..................|netrw-star|
+ Displaying Information About File..................|netrw-qf|
+ Edit File Or Directory Hiding List.................|netrw-ctrl-h|
+ Editing The Sorting Sequence.......................|netrw-S|
+ Going Up...........................................|netrw--|
+ Hiding Files Or Directories........................|netrw-a|
+ Improving Browsing.................................|netrw-ssh-hack|
+ Listing Bookmarks And History......................|netrw-qb|
+ Making A New Directory.............................|netrw-d|
Making The Browsing Directory The Current Directory|netrw-c|
- Bookmarking A Directory............................|netrw-mb|
- Changing To A Bookmarked Directory.................|netrw-gb|
- Listing Bookmarks And History......................|netrw-q|
- Improving Directory Browsing.......................|netrw-listhack| }}}1
+ Marking Files......................................|netrw-mf|
+ Marking Files By Regular Expression................|netrw-mr|
+ Marked Files: Arbitrary Command....................|netrw-mx|
+ Marked Files: Compression And Decompression........|netrw-mz|
+ Marked Files: Copying..............................|netrw-mc|
+ Marked Files: Diff.................................|netrw-md|
+ Marked Files: Editing..............................|netrw-me|
+ Marked Files: Grep.................................|netrw-mg|
+ Marked Files: Hiding and Unhiding by Suffix........|netrw-mh|
+ Marked Files: Moving...............................|netrw-mm|
+ Marked Files: Printing.............................|netrw-mp|
+ Marked Files: Sourcing.............................|netrw-ms|
+ Marked Files: Tagging..............................|netrw-mT|
+ Marked Files: Setting the Target Directory.........|netrw-mt|
+ Marked Files: Unmarking............................|netrw-mu|
+ Netrw Browser Variables............................|netrw-browser-var|
+ Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
+ Netrw Settings.....................................|netrw-settings|
+ Obtaining A File...................................|netrw-O|
+ Preview Window.....................................|netrw-p|
+ Previous Window....................................|netrw-P|
+ Refreshing The Listing.............................|netrw-ctrl-l|
+ Renaming Files Or Directories......................|netrw-move|
+ Reversing Sorting Order............................|netrw-r|
+ Selecting Sorting Style............................|netrw-s|
10. Problems and Fixes...................................|netrw-problems|
-11. Debugging............................................|netrw-debug|
+11. Debugging Netrw Itself...............................|netrw-debug|
12. History..............................................|netrw-history|
13. Credits..............................................|netrw-credits|
-The Netrw plugin is generally sourced automatically as it is a
-|standard-plugin|. That said, to make use of netrw, one must
-have plugins available which can be done with the following
-two lines in your <.vimrc>: >
-
- set nocp " 'compatible' is not set
- filetype plugin on " plugins are enabled
-<
-You can avoid loading this plugin by setting the "loaded_netrw" variable
-in your <.vimrc> file: >
-
- :let loaded_netrw = 1
-
{Vi does not have any of this}
==============================================================================
-2. Starting With Netrw *netrw-start*
+2. Starting With Netrw *netrw-start* {{{1
-Netrw makes reading, writing, and browsing over a network connection easy!
-First, make sure that you have plugins enabled, so you'll need to have at
-least the following in your <.vimrc>: (or see |netrw-activate|) >
+Netrw makes reading files, writing files, browsing over a network, and
+browsing locally easy! First, make sure that you have plugins enabled, so
+you'll need to have at least the following in your <.vimrc>:
+(or see |netrw-activate|) >
set nocp " 'compatible' is not set
filetype plugin on " plugins are enabled
@@ -96,14 +102,13 @@ least the following in your <.vimrc>: (or see |netrw-activate|) >
Netrw supports "transparent" editing of files on other machines using urls
(see |netrw-transparent|). As an example of this, let's assume you have an
-account on some other machine; try >
+account on some other machine; if you can use scp, try: >
vim scp://hostname/path/to/file
<
-if you have an ssh connection. Want to make ssh/scp easier to use? Check
-out |netrw-listhack|!
+Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
-What if you have ftp, not ssh/scp? That's easy, too; try >
+So, what if you have ftp, not ssh/scp? That's easy, too; try >
vim ftp://hostname/path/to/file
<
@@ -117,7 +122,7 @@ and has lines resembling >
...
default login USERID password "PASSWORD"
<
-Now about browsing -- ie. when you just want to look around before editing a
+Now about browsing -- when you just want to look around before editing a
file. For browsing on your current host, just "edit" a directory: >
vim .
@@ -131,28 +136,49 @@ the directory name is followed by a "/"): >
<
See |netrw-browse| for more!
-There's more protocols supported than scp and ftp, too: see the next
-section, |netrw-externapp|.
+There are more protocols supported by netrw just than scp and ftp, too: see the
+next section, |netrw-externapp|, for how to use these external applications.
+
+If you want to use plugins, but for some reason don't wish to use netrw, then
+you need to avoid loading both the plugin and the autoload portions of netrw.
+You may do so by placing the following two lines in your <.vimrc>: >
+
+ :let g:loaded_netrw = 1
+ :let g:loaded_netrwPlugin = 1
+<
==============================================================================
-3. Netrw Reference *netrw-ref*
+3. Netrw Reference *netrw-ref* {{{1
-CONTROLLING EXTERNAL APPLICATIONS *netrw-externapp*
+ Netrw supports several protocols in addition to scp and ftp mentioned
+ in |netrw-start|. These include dav, fetch, http,... well, just look
+ at the list in |netrw-externapp|. Each protocol is associated with a
+ variable which holds the default command supporting that protocol.
+
+EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
Protocol Variable Default Value
-------- ---------------- -------------
dav: *g:netrw_dav_cmd* = "cadaver"
fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
ftp: *g:netrw_ftp_cmd* = "ftp"
- http: *g:netrw_http_cmd* = "curl -o" if curl is available
- http: g:netrw_http_cmd = "wget -q -O" else if wget is available
- http: g:netrw_http_cmd = "fetch -o" else if fetch is available
+ http: *g:netrw_http_cmd* = "curl -o" if curl is available
+ http: g:netrw_http_cmd = "wget -q -O" elseif wget is available
+ http: g:netrw_http_cmd = "fetch -o" elseif fetch is available
rcp: *g:netrw_rcp_cmd* = "rcp"
rsync: *g:netrw_rsync_cmd* = "rsync -a"
scp: *g:netrw_scp_cmd* = "scp -q"
sftp: *g:netrw_sftp_cmd* = "sftp"
-READING *netrw-read* *netrw-nread*
+READING *netrw-read* *netrw-nread* {{{2
+
+ Generally, one may just use the url notation with a normal editing
+ command, such as >
+
+ :e ftp://[user@]machine/path
+<
+ Netrw also provides the Nread command:
+
:Nread ? give help
:Nread "machine:path" uses rcp
:Nread "machine path" uses ftp w/ <.netrc>
@@ -166,7 +192,15 @@ READING *netrw-read* *netrw-nread*
:Nread "scp://[user@]machine[[:#]port]/path" uses scp
:Nread "sftp://[user@]machine/path" uses sftp
-WRITING *netrw-write* *netrw-nwrite*
+WRITING *netrw-write* *netrw-nwrite* {{{2
+
+ One may just use the url notation with a normal file writing
+ command, such as >
+
+ :w ftp://[user@]machine/path
+<
+ Netrw also provides the Nwrite command:
+
:Nwrite ? give help
:Nwrite "machine:path" uses rcp
:Nwrite "machine path" uses ftp w/ <.netrc>
@@ -179,7 +213,15 @@ WRITING *netrw-write* *netrw-nwrite*
:Nwrite "sftp://[user@]machine/path" uses sftp
http: not supported!
-SOURCING *netrw-source*
+SOURCING *netrw-source* {{{2
+
+ One may just use the url notation with the normal file sourcing
+ command, such as >
+
+ :so ftp://[user@]machine/path
+<
+ Netrw also provides the Nsource command:
+
:Nsource ? give help
:Nsource "dav://machine[:port]/path" uses cadaver
:Nsource "fetch://[user@]machine/path" uses fetch
@@ -190,30 +232,48 @@ SOURCING *netrw-source*
:Nsource "scp://[user@]machine[[:#]port]/path" uses scp
:Nsource "sftp://[user@]machine/path" uses sftp
-DIRECTORY LISTING *netrw-dirlist*
+DIRECTORY LISTING *netrw-dirlist* {{{2
+
+ One may browse a directory to get a listing by simply attempting to
+ edit the directory: >
+
+ :e scp://[user]@hostname/path/
+ :e ftp://[user]@hostname/path/
+<
+ For remote directories (ie. those using scp or ftp), that trailing
+ "/" is necessary (it tells netrw that its to treat it as a directory
+ to browse instead of a file to download).
+
+ However, the Nread command can also be used to accomplish this:
+
:Nread [protocol]://[user]@hostname/path/
- *netrw-login* *netrw-password*
- CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass*
+ *netrw-login* *netrw-password*
+CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
Attempts to use ftp will prompt you for a user-id and a password.
These will be saved in global variables g:netrw_uid and
- g:netrw_passwd; subsequent uses of ftp will re-use those two items to
+ s:netrw_passwd; subsequent uses of ftp will re-use those two items to
simplify the further use of ftp. However, if you need to use a
different user id and/or password, you'll want to call NetUserPass()
first. To work around the need to enter passwords, check if your ftp
supports a <.netrc> file in your home directory. Also see
|netrw-passwd| (and if you're using ssh/scp hoping to figure out how
- to not need to use passwords, look at |netrw-listhack|).
+ to not need to use passwords, look at |netrw-ssh-hack|).
:NetUserPass [uid [password]] -- prompts as needed
:call NetUserPass() -- prompts for uid and password
:call NetUserPass("uid") -- prompts for password
:call NetUserPass("uid","password") -- sets global uid and password
-VARIABLES *netrw-variables*
+NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
+(also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-var|)
-(also see: |netrw-browse-var| |netrw-protocol| |netrw-settings| |netrw-var|)
+Netrw provides a lot of variables which allow you to customize netrw to your
+preferences. One way to look at them is via the command :NetrwSettings (see
+|netrw-settings|) which will display your current netrw settings. Most such
+settings are described below, in |netrw-browser-options|, and in
+|netrw-externapp|:
*b:netrw_lastfile* last file Network-read/written retained on a per-buffer
basis (supports plain :Nw )
@@ -236,8 +296,8 @@ VARIABLES *netrw-variables*
*g:netrw_ignorenetrc* =0 (default for linux, cygwin)
=1 If you have a <.netrc> file but it doesn't work and
- you want it ignored, then set this variable as shown.
- (default for Windows + cmd.exe)
+ you want it ignored, then set this variable as
+ shown. (default for Windows + cmd.exe)
*g:netrw_menu* =0 disable netrw's menu
=1 (default) netrw's menu enabled
@@ -246,7 +306,13 @@ VARIABLES *netrw-variables*
be available (see |netrw-gx|)
*g:netrw_uid* (ftp) user-id, retained on a per-session basis
- *g:netrw_passwd* (ftp) password, retained on a per-session basis
+ *s:netrw_passwd* (ftp) password, retained on a per-session basis
+
+ *g:netrw_preview* =0 (default) preview window shown in a horizontally
+ split window
+ =1 preview window shown in a vertically split window.
+ Also affects the "previous window" (see |netrw-P|) in
+ the same way.
*g:netrw_shq* = "'" for Unix/Linux systems (ie. a single quote)
= "'" for Windows + cygwin systems (ie. a single quote)
@@ -258,6 +324,9 @@ VARIABLES *netrw-variables*
*g:netrw_scpport* = "-P" : option to use to set port for scp
*g:netrw_sshport* = "-p" : option to use to set port for ssh
+ *g:netrw_silent* =0 : transfers done normally
+ =1 : transfers done silently
+
*g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
line window. This window provides reliable
delivery of messages. (default)
@@ -279,7 +348,7 @@ VARIABLES *netrw-variables*
*g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
=1 use WinNT's rcp in binary mode (default)
-PATHS *netrw-path*
+PATHS *netrw-path* {{{2
Paths to files are generally user-directory relative for most protocols.
It is possible that some protocol will make paths relative to some
@@ -288,7 +357,7 @@ associated directory, however.
example: vim scp://user@host/somefile
example: vim scp://user@host/subdir1/subdir2/somefile
<
-where "somefile" is the "user"'s home directory. If you wish to get a
+where "somefile" is in the "user"'s home directory. If you wish to get a
file using root-relative paths, use the full path:
>
example: vim scp://user@host//somefile
@@ -296,7 +365,7 @@ file using root-relative paths, use the full path:
<
==============================================================================
-4. Network-Oriented File Transfer *netrw-xfer*
+4. Network-Oriented File Transfer *netrw-xfer* {{{1
Network-oriented file transfer under Vim is implemented by a VimL-based script
(<netrw.vim>) using plugin techniques. It currently supports both reading and
@@ -312,7 +381,7 @@ FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
ex. vim ftp://hostname/path/to/file
<
The characters preceding the colon specify the protocol to use; in the
-example, its ftp. The <netrw.vim> script then formulates a command or a
+example, it's ftp. The <netrw.vim> script then formulates a command or a
series of commands (typically ftp) which it issues to an external program
(ftp, scp, etc) which does the actual file transfer/protocol. Files are read
from/written to a temporary file (under Unix/Linux, /tmp/...) which the
@@ -364,6 +433,10 @@ additional prompting.
| dav://host/path | | cadaver |
| :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
+---------------------------------+----------------------------+------------+
+ | DAV + SSL: | | |
+ | davs://host/path | | cadaver |
+ | :Nread davs://host/path | :Nwrite davs://host/path | cadaver |
+ +---------------------------------+----------------------------+------------+
| FETCH: | | |
| fetch://[user@]host/path | | |
| fetch://[user@]host:http/path | Not Available | fetch |
@@ -419,6 +492,10 @@ Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
NETRC *netrw-netrc*
+The <.netrc> file, typically located in your home directory, contains lines
+therein which map a hostname (machine name) to the user id and password you
+prefer to use with it.
+
The typical syntax for lines in a <.netrc> file is given as shown below.
Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
>
@@ -433,7 +510,7 @@ password.
Since this file contains passwords, make very sure nobody else can
read this file! Most programs will refuse to use a .netrc that is
readable for others. Don't forget that the system administrator can
- still read the file!
+ still read the file! Ie. for Linux/Unix: chmod 600 .netrc
PASSWORD *netrw-passwd*
@@ -444,17 +521,19 @@ after one has set it.
Unfortunately there doesn't appear to be a way for netrw to feed a password to
scp. Thus every transfer via scp will require re-entry of the password.
-However, |netrw-listhack| can help with this problem.
+However, |netrw-ssh-hack| can help with this problem.
==============================================================================
-5. Activation *netrw-activate*
+5. Activation *netrw-activate* {{{1
Network-oriented file transfers are available by default whenever Vim's
-|'nocompatible'| mode is enabled. The <netrw.vim> file resides in your
-system's vim-plugin directory and is sourced automatically whenever you bring
-up vim. I suggest that, at a minimum, you have at least the following in your
-<.vimrc> customization file: >
+|'nocompatible'| mode is enabled. Netrw's script files reside in your
+system's plugin, autoload, and syntax directories; just the
+plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
+vim. The main script in autoload/netrw.vim is only loaded when you actually
+use netrw. I suggest that, at a minimum, you have at least the following in
+your <.vimrc> customization file: >
set nocp
if version >= 600
@@ -463,11 +542,12 @@ up vim. I suggest that, at a minimum, you have at least the following in your
<
==============================================================================
-6. Transparent File Transfer *netrw-transparent*
+6. Transparent File Editing *netrw-transparent* {{{1
Transparent file transfers occur whenever a regular file read or write
-(invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made.
-Thus one may use files across networks just as simply as if they were local. >
+(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
+events) is made. Thus one may read, write, or source files across networks
+just as easily as if they were local files! >
vim ftp://[user@]machine/path
...
@@ -478,10 +558,10 @@ such as netrw.
==============================================================================
-7. Ex Commands *netrw-ex*
+7. Ex Commands *netrw-ex* {{{1
The usual read/write commands are supported. There are also a few
-additional commands available. Often you won't need to use Nw or
+additional commands available. Often you won't need to use Nwrite or
Nread as shown in |netrw-transparent| (ie. simply use >
:e url
:r url
@@ -489,20 +569,20 @@ Nread as shown in |netrw-transparent| (ie. simply use >
instead, as appropriate) -- see |netrw-urls|. In the explanations
below, a {netfile} is an url to a remote file.
-:[range]Nw Write the specified lines to the current
+:[range]Nw[rite] Write the specified lines to the current
file as specified in b:netrw_lastfile.
-:[range]Nw {netfile} [{netfile}]...
+:[range]Nw[rite] {netfile} [{netfile}]...
Write the specified lines to the {netfile}.
-:Nread Read the specified lines into the current
+:Nr[ead] Read the specified lines into the current
buffer from the file specified in
b:netrw_lastfile.
-:Nread {netfile} {netfile}...
+:Nr[ead] {netfile} {netfile}...
Read the {netfile} after the current line.
-:Nsource {netfile}
+:Ns[ource] {netfile}
Source the {netfile}.
To start up vim using a remote .vimrc, one may use
the following (all on one line) (tnx to Antoine Mechelynck) >
@@ -511,31 +591,33 @@ below, a {netfile} is an url to a remote file.
--cmd "source scp://HOSTNAME/.vimrc"
< *netrw-uidpass*
:call NetUserPass()
- If b:netrw_uid and b:netrw_passwd don't exist,
- this function query the user for them.
+ If g:netrw_uid and s:netrw_passwd don't exist,
+ this function will query the user for them.
:call NetUserPass("userid")
- This call will set the b:netrw_uid and, if
+ This call will set the g:netrw_uid and, if
the password doesn't exist, will query the user for it.
:call NetUserPass("userid","passwd")
- This call will set both the b:netrw_uid and b:netrw_passwd.
+ This call will set both the g:netrw_uid and s:netrw_passwd.
The user-id and password are used by ftp transfers. One may
- effectively remove the user-id and password by using ""
- strings.
+ effectively remove the user-id and password by using empty
+ strings (ie. "").
:NetrwSettings This command is described in |netrw-settings| -- used to
display netrw settings and change netrw behavior.
==============================================================================
-8. Variables and Options *netrw-options* *netrw-var*
+8. Variables and Options *netrw-options* *netrw-var* {{{1
+
+(if you're interested in the netrw browser settings, see: |netrw-browser-var|)
The <netrw.vim> script provides several variables which act as options to
-ffect <netrw.vim>'s behavior. These variables typically may be set in the
-user's <.vimrc> file:
-(also see:
-|netrw-settings| |netrw-browse-var| |netrw-protocol| |netrw-settings|) >
+affect <netrw.vim>'s file transfer behavior. These variables typically may be
+set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
+
+>
-------------
Netrw Options
@@ -584,7 +666,7 @@ temporarily.
g:netrw_fname Holds filename being accessed >
------------------------------------------------------------
<
- *netrw-protocol*
+ *netrw-protocol*
Netrw supports a number of protocols. These protocols are invoked using the
variables listed below, and may be modified by the user.
@@ -706,297 +788,460 @@ itself:
>
==============================================================================
-9. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
-
-MAPS *netrw-maps*
- <F1>.............Help.......................................|netrw-help|
- <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|
- c................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................Preview Window.............................|netrw-p|
- q................Listing Bookmarks and History..............|netrw-q|
- r................Reversing Sorting Order....................|netrw-r|
- R................Renaming Files or Directories..............|netrw-R|
- s................Selecting Sorting Style....................|netrw-s|
- S................Editing the Sorting Sequence...............|netrw-S|
- t................Browsing with a new tab....................|netrw-t|
- u................Changing to a Predecessor Directory........|netrw-u|
- U................Changing to a Successor Directory..........|netrw-U|
- v................Browsing with a Vertical Split.............|netrw-v|
- x................Customizing Browsing.......................|netrw-x|
-
- COMMANDS *netrw-explore-cmds*
- :Explore[!] [dir] Explore directory of current file........|netrw-explore|
- :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore|
- :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore|
- :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
- :Texplore[!] [dir] Tab & Explore............................|netrw-explore|
- :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
- :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
- :NetrwSettings.............................................|netrw-settings|
-
-QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
+9. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1
+ *netrw-browser* *netrw-dir* *netrw-list*
+
+INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2
+ (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
+
+Netrw supports the browsing of directories on your local system and on remote
+hosts; browsing includes listing files and directories, entering directories,
+editing files therein, deleting files/directories, making new directories,
+moving (renaming) files and directories, copying files and directories, etc.
+One may mark files and execute any system command on them! The Netrw browser
+generally implements the previous explorer's maps and commands for remote
+directories, although details (such as pertinent global variable names)
+necessarily differ. To browse a directory, simply "edit" it! >
+
+ vim /your/directory/
+ vim .
+ vim c:\your\directory\
+<
+(Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t|
+ |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| )
+
+The Netrw remote file and directory browser handles two protocols: ssh and
+ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp
+in its remote browsing. Specifying any other protocol will cause it to be
+used for file transfers; but the ssh protocol will be used to do remote
+browsing.
+
+To use Netrw's remote directory browser, simply attempt to read a "file" with
+a trailing slash and it will be interpreted as a request to list a directory:
>
- ------- -----------
- Command Explanation
- ------- -----------
-< <F1> Causes Netrw to issue help
- <cr> Netrw will enter the directory or read the file |netrw-cr|
- <del> Netrw will attempt to remove the file/directory |netrw-del|
- - Makes Netrw go up one directory |netrw--|
- a Toggles between normal display, |netrw-a|
- hiding (suppress display of files matching g:netrw_list_hide)
- showing (display only files which match g:netrw_list_hide)
- mb bookmark current directory
- gb go to previous bookmarked directory
- c Make current browsing directory the current directory |netrw-c|
- d Make a directory |netrw-d|
- D Netrw will attempt to remove the file(s)/directory(ies) |netrw-D|
- <c-h> Edit file hiding list |netrw-ctrl-h|
- i Cycle between thin, long, wide, and tree listings|netrw-i|
- <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
- o Enter the file/directory under the cursor in a new browser
- window. A horizontal split is used. |netrw-o|
- O Obtain a file specified by cursor |netrw-O|
- p Preview the file |netrw-p|
- P Browse in the previously used window |netrw-P|
- q List bookmarked directories and history |netrw-q|
- r Reverse sorting order |netrw-r|
- R Rename the designed file(s)/directory(ies) |netrw-R|
- s Select sorting style: by name, time, or file size |netrw-s|
- S Specify suffix priority for name-sorting |netrw-S|
- t Enter the file/directory under the cursor in a new tab|netrw-t|
- u Change to recently-visited directory |netrw-u|
- U Change to subsequently-visited directory |netrw-U|
- v Enter the file/directory under the cursor in a new browser
- window. A vertical split is used. |netrw-v|
- x Apply a function to a file. (special browsers) |netrw-x|
+ vim [protocol]://[user@]hostname/path/
+<
+where [protocol] is typically scp or ftp. As an example, try: >
-NETRW BROWSER VARIABLES *netrw-browse-var*
+ vim ftp://ftp.home.vim.org/pub/vim/
+<
+For local directories, the trailing slash is not required. Again, because its
+easy to miss: to browse remote directories, the url must terminate with a
+slash!
+
+If you'd like to avoid entering the password repeatedly for remote directory
+listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with
+ftp, see |netrw-netrc| (if your ftp supports it).
+
+There are several things you can do to affect the browser's display of files:
+
+ * To change the listing style, press the "i" key (|netrw-i|).
+ Currently there are four styles: thin, long, wide, and tree.
+
+ * To hide files (don't want to see those xyz~ files anymore?) see
+ |netrw-ctrl-h|.
+
+ * Press s to sort files by name, time, or size.
+
+See |netrw-browse-cmds| for all the things you can do with netrw!
+
+
+QUICK HELP *netrw-quickhelp* {{{2
+ (Use ctrl-] to select a topic)~
+ Intro to Browsing...............................|netrw-intro-browse|
+ Quick Reference: Maps.........................|netrw-quickmap|
+ Quick Reference: Commands.....................|netrw-browse-cmds|
+ Hiding
+ Edit hiding list..............................|netrw-ctrl-h|
+ Hiding Files or Directories...................|netrw-a|
+ Hiding/Unhiding by suffix.....................|netrw-mh|
+ Hiding dot-files.............................|netrw-gh|
+ Listing Style
+ Select listing style (thin/long/wide/tree)....|netrw-i|
+ Associated setting variable...................|g:netrw_liststyle|
+ Shell command used to perform listing.........|g:netrw_list_cmd|
+ Quick file info...............................|netrw-qf|
+ Sorted by
+ Select sorting style (name/time/size).........|netrw-s|
+ Editing the sorting sequence..................|netrw-S|
+ Associated setting variable...................|g:netrw_sort_sequence|
+ Reverse sorting order.........................|netrw-r|
+
+
+ *netrw-quickmap* *netrw-quickmaps*
+QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
>
- --- -----------
- Var Explanation
- --- -----------
-< *g:netrw_alto* change from above splitting to below splitting
- by setting this variable (see |netrw-o|)
- default: =&sb (see |'sb'|)
+ --- ----------------- ----
+ Map Quick Explanation Link
+ --- ----------------- ----
+< <F1> Causes Netrw to issue help
+ <cr> Netrw will enter the directory or read the file |netrw-cr|
+ <del> Netrw will attempt to remove the file/directory |netrw-del|
+ - Makes Netrw go up one directory |netrw--|
+ a Toggles between normal display, |netrw-a|
+ hiding (suppress display of files matching g:netrw_list_hide)
+ showing (display only files which match g:netrw_list_hide)
+ c Make browsing directory the current directory |netrw-c|
+ d Make a directory |netrw-d|
+ D Attempt to remove the file(s)/directory(ies) |netrw-D|
+ gb Go to previous bookmarked directory |netrw-gb|
+ gh Quick hide/unhide of dot-files |netrw-gh|
+ gi Display information on file |netrw-qf|
+ <c-h> Edit file hiding list |netrw-ctrl-h|
+ i Cycle between thin, long, wide, and tree listings |netrw-i|
+ <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
+ mb Bookmark current directory |netrw-mb|
+ mc Copy marked files to marked-file target directory |netrw-mc|
+ md Apply diff to marked files (up to 3) |netrw-md|
+ me Place marked files on arg list and edit them |netrw-me|
+ mf Mark a file |netrw-mf|
+ mh Toggle marked file suffices' presence on hiding list |netrw-mh|
+ mm Move marked files to marked-file target directory |netrw-mm|
+ mp Print marked files |netrw-mp|
+ mr Mark files satisfying a |regexp| |netrw-mr|
+ mt Current browsing directory becomes markfile target |netrw-mt|
+ mT Apply ctags to marked files |netrw-mT|
+ mu Unmark all marked files |netrw-mu|
+ mx Apply arbitrary shell command to marked files |netrw-mx|
+ mz Compress/decompress marked files |netrw-mz|
+ o Enter the file/directory under the cursor in a new |netrw-o|
+ browser window. A horizontal split is used.
+ O Obtain a file specified by cursor |netrw-O|
+ p Preview the file |netrw-p|
+ P Browse in the previously used window |netrw-P|
+ q List bookmarked directories and history |netrw-qb|
+ r Reverse sorting order |netrw-r|
+ R Rename the designed file(s)/directory(ies) |netrw-R|
+ s Select sorting style: by name, time, or file size |netrw-s|
+ S Specify suffix priority for name-sorting |netrw-S|
+ t Enter the file/directory under the cursor in a new tab|netrw-t|
+ u Change to recently-visited directory |netrw-u|
+ U Change to subsequently-visited directory |netrw-U|
+ v Enter the file/directory under the cursor in a new |netrw-v|
+ browser window. A vertical split is used.
+ x View file with an associated program |netrw-x|
+
+ <leftmouse> (gvim only) selects word under mouse as if a <cr>
+ had been pressed (ie. edit file, change directory)
+ <middlemouse> (gvim only) same as P selecting word under mouse;
+ see |netrw-P|
+ <rightmouse> (gvim only) delete file/directory using word under
+ mouse
+ <2-leftmouse> (gvim only) when:
+ * in a netrw-selected file, AND
+ * |g:netrw_retmap| == 1 AND
+ * the user doesn't already have a <2-leftmouse> mapping
+ defined before netrw is autoloaded,
+ then a double clicked leftmouse button will return
+ to the netrw browser window.
+ <s-leftmouse> (gvim only) like mf, will mark files
+
+ *netrw-quickcom* *netrw-quickcoms*
+QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
+ :NetrwClean[!] ...........................................|netrw-clean|
+ :NetrwSettings ...........................................|netrw-settings|
+ :Explore[!] [dir] Explore directory of current file......|netrw-explore|
+ :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
+ :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
+ :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
+ :Rexplore Return to Explorer.......