Home Explore Blog CI



neovim

3rd chunk of `runtime/doc/usr_23.txt`
84cd8978cb580fb862a0c6620646c84fef77bb0253ea5d7100000001000007ed
 works with the netrw plugin.  Currently URLs
with these formats are recognized:

	ftp://		uses ftp
	rcp://		uses rcp
	scp://		uses scp
	http://		uses wget (reading only)

Vim doesn't do the communication itself, it relies on the mentioned programs
to be available on your computer.  On most Unix systems "ftp" and "rcp" will
be present.  "scp" and "wget" might need to be installed.

Vim detects these URLs for each command that starts editing a new file, also
with ":edit" and ":split", for example.  Write commands also work, except for
http://.

For more information, also about passwords, see |netrw|.

==============================================================================
*23.3*	Binary files

You can edit binary files with Vim.  Vim wasn't really made for this, thus
there are a few restrictions.  But you can read a file, change a character and
write it back, with the result that only that one character was changed and
the file is identical otherwise.
   To make sure that Vim does not use its clever tricks in the wrong way, add
the "-b" argument when starting Vim: >

	vim -b datafile

This sets the 'binary' option.  The effect of this is that unexpected side
effects are turned off.  For example, 'textwidth' is set to zero, to avoid
automatic formatting of lines.  And files are always read in Unix file format.

Binary mode can be used to change a message in a program.  Be careful not to
insert or delete any characters, it would stop the program from working.  Use
"R" to enter replace mode.

Many characters in the file will be unprintable.  To see them in Hex format: >

	:set display=uhex

Otherwise, the "ga" command can be used to see the value of the character
under the cursor.  The output, when the cursor is on an <Esc>, looks like
this:

	<^[>  27,  Hex 1b,  Octal 033 ~

There might not be many line breaks in the file.  To get some overview switch
the 'wrap' option off: >

	:set nowrap


BYTE POSITION

To see on which byte you are in the file use this command: >

	g CTRL-G

The output is

Title: Accessing URLs with Netrw and Editing Binary Files in Vim
Summary
This section details Vim's capabilities for accessing files via URLs using the netrw plugin, outlining supported protocols (ftp, rcp, scp, http) and the external programs they rely on. It then discusses editing binary files, emphasizing the use of the '-b' option to prevent unwanted side effects. Techniques for viewing and modifying binary data, such as using replace mode ('R'), displaying unprintable characters in hexadecimal format, disabling line wrapping, and determining byte position with 'g CTRL-G', are also covered.