Home Explore Blog CI



neovim

4th chunk of `runtime/pack/dist/opt/netrw/doc/netrw.txt`
359aa156bbeb031b3e17b7fe08ae2938e79bdec8fdbab8600000000100000fa3
 sure that
the directory name is followed by a "/"): >

	vim scp://hostname/
	vim ftp://hostname/path/to/dir/
<
See |netrw-browse| for more!

There are more protocols supported by netrw than just scp and ftp, too: see the
next section, |netrw-externapp|, on how to use these external applications with
netrw and vim.

PREVENTING LOADING					*netrw-noload*

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* {{{1

   Netrw supports several protocols in addition to scp and ftp as 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"    if cadaver is executable
	   dav:   g:netrw_dav_cmd      = "curl -o"    elseif curl is available
	 fetch:   *g:netrw_fetch_cmd*    = "fetch -o"   if fetch is available
	   ftp:   *g:netrw_ftp_cmd*      = "ftp"
	  http:   *g:netrw_http_cmd*     = "elinks"     if   elinks  is available
	  http:   g:netrw_http_cmd     = "links"      elseif links is available
	  http:   g:netrw_http_cmd     = "curl"       elseif curl  is available
	  http:   g:netrw_http_cmd     = "wget"       elseif wget  is available
	  http:   g:netrw_http_cmd     = "fetch"      elseif fetch is available
	  http:   *g:netrw_http_put_cmd* = "curl -T"
	   rcp:   *g:netrw_rcp_cmd*      = "rcp"
	 rsync:   *g:netrw_rsync_cmd*    = "rsync"     (see |g:netrw_rsync_sep|)
	   scp:   *g:netrw_scp_cmd*      = "scp -q"
	  sftp:   *g:netrw_sftp_cmd*     = "sftp"
	  file:   *g:netrw_file_cmd*     = "elinks" or "links"

	*g:netrw_http_xcmd* : the option string for http://... protocols are
	specified via this variable and may be independently overridden.  By
	default, the option arguments for the http-handling commands are: >

		    elinks : "-source >"
		    links  : "-dump >"
		    curl   : "-L -o"
		    wget   : "-q -O"
		    fetch  : "-o"
<
	For example, if your system has elinks, and you'd rather see the
	page using an attempt at rendering the text, you may wish to have >
		let g:netrw_http_xcmd= "-dump >"
<	in your .vimrc.

	g:netrw_http_put_cmd: this option specifies both the executable and
	any needed options.  This command does a PUT operation to the url.


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>
	:Nread "machine id password path"		uses ftp
	:Nread "dav://machine[:port]/path"		uses cadaver
	:Nread "fetch://[user@]machine/path"		uses fetch
	:Nread "ftp://[user@]machine[[:#]port]/path"	uses ftp w/ <.netrc>
	:Nread "http://[user@]machine/path"		uses http  uses wget
	:Nread "rcp://[user@]machine/path"		uses rcp
	:Nread "rsync://[user@]machine[:port]/path"	uses rsync
	:Nread "scp://[user@]machine[[:#]port]/path"	uses scp
	:Nread "sftp://[user@]machine/path"		uses sftp

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>
	:Nwrite "machine id password path"		uses ftp
	:Nwrite "dav://machine[:port]/path"		uses cadaver

Title: Netrw Protocols, External Applications, Reading and Writing
Summary
This section of the Netrw documentation covers browsing directories, preventing Netrw from loading, and providing a reference for supported protocols like dav, fetch, http, rcp, rsync, scp, sftp, and file, detailing the associated variables and default commands. It discusses external applications, protocols, and how to configure options for http protocols. The document also explains how to read and write files using URLs with standard editing commands and the specific Nread/Nwrite commands, providing examples for various protocols.