Home Explore Blog CI



neovim

50th chunk of `runtime/pack/dist/opt/netrw/doc/netrw.txt`
38f4725e7bb2e40f7f0e66e8d6dcbe118a0b804014b4c1b40000000100000f9d
 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 control netrw's buffer
		settings; try putting >
		  let g:netrw_bufsettings="noma nomod nu nobl nowrap ro nornu"
<		in your .vimrc.  If you'd like to have relative numbering
		instead, try >
		  let g:netrw_bufsettings="noma nomod nonu nobl nowrap ro rnu"
<
								*netrw-P19*
	P19. How may I have gvim start up showing a directory listing?      {{{2
		Try putting the following code snippet into your .vimrc: >
		    augroup VimStartup
		      au!
		      au VimEnter * if expand("%") == "" && argc() == 0 &&
		      \ (v:servername =~ 'GVIM\d*' || v:servername == "")
		      \ | e . | endif
		    augroup END
<		You may use Lexplore instead of "e" if you're so inclined.
		This snippet assumes that you have client-server enabled
		(ie. a "huge" vim version).

								*netrw-P20*
	P20. I've made a directory (or file) with an accented character,    {{{2
		but netrw isn't letting me enter that directory/read that file:

		Its likely that the shell or o/s is using a different encoding
		than you have vim (netrw) using.  A patch to vim supporting
		"systemencoding" may address this issue in the future; for
		now, just have netrw use the proper encoding.  For example: >

			au FileType netrw set enc=latin1
<
								*netrw-P21*
	P21. I get an error message when I try to copy or move a file:      {{{2
>
		**error** (netrw) tried using g:netrw_localcopycmd<cp>; it doesn't work!
<
	     What's wrong?

	     Netrw uses several system level commands to do things (see

		 |g:netrw_localcopycmd|, |g:netrw_localmovecmd|,
		 |g:netrw_mkdir_cmd|).

	    You may need to adjust the default commands for one or more of
	    these commands by setting them properly in your .vimrc.  Another
	    source of difficulty is that these commands use vim's local
	    directory, which may not be the same as the browsing directory
	    shown by netrw (see |g:netrw_keepdir|).

==============================================================================
11. Credits						*netrw-credits* {{{1

	Vim editor	by Bram Moolenaar (Thanks, Bram!)
	dav		support by C Campbell
	fetch		support by Bram Moolenaar and C Campbell
	ftp		support by C Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
	http		support by Bram Moolenaar <bram@moolenaar.net>
	rcp
	rsync		support by C Campbell (suggested by Erik Warendorph)
	scp		support by raf <raf@comdyn.com.au>
	sftp		support by C Campbell

	inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell

	Jérôme Augé		-- also using new buffer method with ftp+.netrc
	Bram Moolenaar		-- obviously vim itself, :e and v:cmdarg use,
	                           fetch,...
	Yasuhiro Matsumoto	-- pointing out undo+0r problem and a solution
	Erik Warendorph		-- for several suggestions (g:netrw_..._cmd
				   variables, rsync etc)
	Doug Claar		-- modifications to test for success with ftp
	                           operation

==============================================================================
Modelines: {{{1
vim:tw=78:ts=8:ft=help:noet:norl:fdm=marker

Title: Netrw FAQs: Buffer Closing, Numbering, Startup Directory, Encoding, and Copy/Move Errors
Summary
This section addresses several frequently asked questions about netrw. It covers the issue of buffers closing unexpectedly due to the 'autochdir' setting, how to enable numbering in directory listings using 'g:netrw_bufsettings', how to configure gvim to start with a directory listing, how to handle encoding issues with accented characters in directory/file names, and how to resolve errors when copying or moving files by adjusting system-level commands like 'g:netrw_localcopycmd'. It also provides a link to a Stack Overflow answer on how to edit a file accessible only through another server via SSH.