Home Explore Blog CI



neovim

48th chunk of `runtime/pack/dist/opt/netrw/doc/netrw.txt`
47f446ce907123dad089127b9643434b59a6fe9ef76421670000000100000fa2
 attempt appears to be causing ml_get errors to
		appear.  Please try setting |g:netrw_use_noswf| to 0
		in your <.vimrc>: >
			let g:netrw_use_noswf= 0
<
								*netrw-p9*
	P9. I'm being pestered with "[something] is a directory" and       {{{2
	     "Press ENTER or type command to continue" prompts...

		The "[something] is a directory" prompt is issued by Vim,
		not by netrw, and there appears to be no way to work around
		it.  Coupled with the default cmdheight of 1, this message
		causes the "Press ENTER..." prompt.  So:  read |hit-enter|;
		I also suggest that you set your |'cmdheight'| to 2 (or more) in
		your <.vimrc> file.

								*netrw-p10*
	P10. I want to have two windows; a thin one on the left and my      {{{2
	     editing window on the right.  How may I accomplish this?

	     You probably want netrw running as in a side window.  If so, you
	     will likely find that ":[N]Lexplore" does what you want.  The
	     optional "[N]" allows you to select the quantity of columns you
	     wish the |:Lexplore|r window to start with (see |g:netrw_winsize|
	     for how this parameter works).

	     Previous solution:

		* Put the following line in your <.vimrc>:
			let g:netrw_altv = 1
		* Edit the current directory:  :e .
		* Select some file, press v
		* Resize the windows as you wish (see |CTRL-W_<| and
		  |CTRL-W_>|).  If you're using gvim, you can drag
		  the separating bar with your mouse.
		* When you want a new file, use  ctrl-w h  to go back to the
		  netrw browser, select a file, then press P  (see |CTRL-W_h|
		  and |netrw-P|).  If you're using gvim, you can press
		  <leftmouse> in the browser window and then press the
		  <middlemouse> to select the file.


								*netrw-p11*
	P11. My directory isn't sorting correctly, or unwanted letters are  {{{2
	     appearing in the listed filenames, or things aren't lining
	     up properly in the wide listing, ...

	     This may be due to an encoding problem.  I myself usually use
	     utf-8, but really only use ascii (ie. bytes from 32-126).
	     Multibyte encodings use two (or more) bytes per character.
	     You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.

								*netrw-p12*
	P12. I'm a Windows + putty + ssh user, and when I attempt to        {{{2
	     browse, the directories are missing trailing "/"s so netrw treats
	     them as file transfers instead of as attempts to browse
	     subdirectories.  How may I fix this?

	     (mikeyao) If you want to use vim via ssh and putty under Windows,
	     try combining the use of pscp/psftp with plink.  pscp/psftp will
	     be used to connect and plink will be used to execute commands on
	     the server, for example: list files and directory using 'ls'.

	     These are the settings I use to do this:
>
	    " list files, it's the key setting, if you haven't set,
	    " you will get a blank buffer
	    let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"
	    " if you haven't add putty directory in system path, you 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

Title: Netrw Troubleshooting: Window Layout, Sorting, SSH, and Speed
Summary
This section provides solutions for common issues in netrw. It covers resolving 'ml_get' errors by disabling swapfiles and addressing 'directory' prompts by adjusting the 'cmdheight'. It explains how to configure a side window for netrw using ':Lexplore' or the older method involving 'g:netrw_altv'. It also addresses sorting and encoding problems, suggesting adjustments to 'g:netrw_sepchr' and 'g:netrw_xstrlen'. For Windows users with PuTTY, it details using pscp/psftp with plink and provides configuration settings. Finally, it discusses speeding up writes over SCP/SSH by utilizing SSH ControlMaster and ControlPath.