Home Explore Blog CI



neovim

49th chunk of `runtime/pack/dist/opt/netrw/doc/netrw.txt`
52c995548ecfb662d24d36d6fb965fbcf07dd0eaf67119dd0000000100000bb6
 should
	    " specify scp/sftp command.  For examples:
	    "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
	    "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
<
								*netrw-p13*
	P13. I would like to speed up writes using Nwrite and scp/ssh       {{{2
	     style connections.  How?  (Thomer M. Gil)

	     Try using ssh's ControlMaster and ControlPath (see the ssh_config
	     man page) to share multiple ssh connections over a single network
	     connection. That cuts out the cryptographic handshake on each
	     file write, sometimes speeding it up by an order of magnitude.
	     (see  http://thomer.com/howtos/netrw_ssh.html)
	     (included by permission)

	     Add the following to your ~/.ssh/config: >

		 # you change "*" to the hostname you care about
		 Host *
		   ControlMaster auto
		   ControlPath /tmp/%r@%h:%p

<	     Then create an ssh connection to the host and leave it running: >

		 ssh -N host.domain.com

<	     Now remotely open a file with Vim's Netrw and enjoy the
	     zippiness: >

		vim scp://host.domain.com//home/user/.bashrc
<
								*netrw-p14*
	P14. How may I use a double-click instead of netrw's usual single   {{{2
	     click to open a file or directory?  (Ben Fritz)

	     First, disable netrw's mapping with >
		    let g:netrw_mousemaps= 0
<	     and then create a netrw buffer only mapping in
	     $HOME/.vim/after/ftplugin/netrw.vim: >
		    nmap <buffer> <2-leftmouse> <CR>
<	     Note that setting g:netrw_mousemaps to zero will turn off
	     all netrw's mouse mappings, not just the <leftmouse> one.
	     (see |g:netrw_mousemaps|)

								*netrw-p15*
	P15. When editing remote files (ex. :e ftp://hostname/path/file),   {{{2
	     under Windows I get an |E303| message complaining that its unable
	     to open a swap file.

	     (romainl) It looks like you are starting Vim from a protected
	     directory.  Start netrw from your $HOME or other writable
	     directory.

								*netrw-p16*
	P16. Netrw is closing buffers on its own.                           {{{2
	     What steps will reproduce the problem?
		1. :Explore, navigate directories, open a file
		2. :Explore, open another file
		3. Buffer opened in step 1 will be closed. o
	    What is the expected output? What do you see instead?
		I expect both buffers to exist, but only the last one does.

	   (Lance) Problem is caused by "set autochdir" in .vimrc.
	   (drchip) I am able to duplicate this problem with |'acd'| set.
	            It appears that the buffers are not exactly closed;
		    a ":ls!" will show them (although ":ls" does not).

								*netrw-P17*
	P17. How to locally edit a file that's only available via           {{{2
	     another server accessible via ssh?
	     See http://stackoverflow.com/questions/12469645/
	     "Using Vim to Remotely Edit A File on ServerB Only
	      Accessible From ServerA"

								*netrw-P18*
	P18. How do I get numbering on in directory listings?               {{{2
		With |g:netrw_bufsettings|, you can

Title: Netrw Troubleshooting: SSH Speed, Double-Clicking, and Remote File Editing
Summary
This section provides solutions for various netrw issues. It covers speeding up Nwrite and SCP/SSH connections by using SSH ControlMaster and ControlPath. It describes how to configure a double-click action in netrw to open files/directories by disabling default mousemaps and creating a custom mapping. It addresses an E303 error when editing remote files in Windows due to protected directories. It explains how the 'autochdir' setting can cause buffers to close unexpectedly and suggests disabling it. It provides a link to a Stack Overflow answer on how to edit a file accessible only through another server via SSH. Finally, it mentions enabling numbering in directory listings using 'g:netrw_bufsettings'.