Home Explore Blog CI



neovim

1st chunk of `runtime/doc/vi_diff.txt`
1f7d2ff64e6aa8ad340dc7b87f78e8c9d6048b7aacd3af2f0000000100000fa5
*vi_diff.txt*   Nvim


		  VIM REFERENCE MANUAL    by Bram Moolenaar


Differences between Vim and Vi				*vi-differences*

                                      Type |gO| to see the table of contents.

==============================================================================
1. Limits						*limits*

Vim has only a few limits for the files that can be edited. Vi cannot handle
<Nul> characters and characters above 128, has limited line length, many other
limits.

Maximum line length	   2147483647 characters
Maximum number of lines	   2147483647 lines
Maximum file size	   2147483647 bytes (2 Gbyte) when a long integer is
			   32 bits.  Much more for 64 bit longs.  Also limited
			   by available disk space for the |swap-file|.
							*E75*
Length of a file path	   Unix and Win32: 1024 characters, otherwise 256
			   characters (or as much as the system supports).
Length of an expanded string option
			   Unix and Win32: 1024 characters, otherwise 256
			   characters
Maximum display width	   Unix and Win32: 1024 characters, otherwise 255
			   characters
Maximum lhs of a mapping   50 characters.
Number of different highlighting types: over 30000
Range of a Number variable:  -2147483648 to 2147483647 (might be more on 64
			   bit systems)  See also: |v:numbermax|,
			   |v:numbermin| and |v:numbersize|
Maximum length of a line in a tags file: 512 bytes.
							*E1541*
Maximum value for |/\U| and |/\%U|: 2147483647 (for 32bit integer).

Information for undo and text in registers is kept in memory, thus when making
(big) changes the amount of (virtual) memory available limits the number of
undo levels and the text that can be kept in registers.  Other things are also
kept in memory:  Command-line history, error messages for Quickfix mode, etc.

==============================================================================
2. The most interesting additions			*vim-additions*

Support for different systems.
	Vim can be used on:
	- Modern Unix systems (BSD, Linux, etc.)
	- Windows (XP SP 2 or greater)
	- OS X

Multi level persistent undo.					|undo|
	'u' goes backward in time, 'CTRL-R' goes forward again.  Set option
	'undolevels' to the number of changes to be remembered (default 1000).
	Set 'undolevels' to 0 for a Vi-compatible one level undo.  Set it to
	-1 for no undo at all.
	When all changes in a buffer have been undone, the buffer is not
	considered changed anymore.  You can exit it with :q, without <!>.
	When undoing a few changes and then making a new change Vim will
	create a branch in the undo tree.  This means you can go back to any
	state of the text, there is no risk of a change causing text to be
	lost forever. |undo-tree|
	The undo information is stored in a file when the 'undofile' option is
	set.  This means you can exit Vim, start Vim on a previously edited
	file and undo changes that were made before exiting Vim.

Graphical User Interface (GUI).				|gui|
	Included support for GUI: menu's, mouse, scrollbars, etc.  You can
	define your own menus.  Better support for CTRL/SHIFT/ALT keys in
	combination with special keys and mouse.  Supported for various
	platforms such as Win32.

Multiple windows and buffers.				|windows.txt|
	Vim can split the screen into several windows, each editing a
	different buffer or the same buffer at a different location.  Buffers
	can still be loaded (and changed) but not displayed in a window.  This
	is called a hidden buffer.  Many commands and options have been added
	for this facility.
	Vim can also use multiple tab pages, each with one or more windows.  A
	line with tab labels can be used to quickly switch between these pages.
	|tab-page|

Syntax highlighting.					|:syntax|
	Vim can highlight keywords, patterns and other things.  This is
	defined by a number of |:syntax| commands, and can be made to
	highlight most languages and file types.  A number of files are
	included for highlighting the most common languages, like C, C++,
	Java, Pascal, Makefiles, shell scripts, etc.  The colors

Title: Vim vs Vi: Limits and Additions
Summary
This section of the Vim reference manual highlights the differences between Vim and Vi, focusing on Vim's expanded capabilities. Vim boasts significantly higher limits for file size, line length, and number of lines compared to Vi. Key additions in Vim include support for multiple operating systems (Unix, Windows, OS X), multi-level persistent undo functionality, a graphical user interface (GUI), multiple windows and buffers, tab pages, and syntax highlighting for various programming languages and file types.