Home Explore Blog CI



neovim

78th chunk of `runtime/doc/options.txt`
f52f95ff4a2e6315946fa78e75f6fb13d82ce128b45fb1b70000000100000fa2
 items in the input-line history to be
		saved.  When not included, the value of 'history' is used.
							*shada-c*
	c	Dummy option, kept for compatibility reasons.  Has no actual
		effect: ShaDa always uses UTF-8 and 'encoding' value is fixed
		to UTF-8 as well.
							*shada-f*
	f	Whether file marks need to be stored.  If zero, file marks ('0
		to '9, 'A to 'Z) are not stored.  When not present or when
		non-zero, they are all stored.  '0 is used for the current
		cursor position (when exiting or when doing |:wshada|).
							*shada-h*
	h	Disable the effect of 'hlsearch' when loading the shada
		file.  When not included, it depends on whether ":nohlsearch"
		has been used since the last search command.
							*shada-n*
	n	Name of the shada file.  The name must immediately follow
		the 'n'.  Must be at the end of the option!  If the
		'shadafile' option is set, that file name overrides the one
		given here with 'shada'.  Environment variables are
		expanded when opening the file, not when setting the option.
							*shada-r*
	r	Removable media.  The argument is a string (up to the next
		',').  This parameter can be given several times.  Each
		specifies the start of a path for which no marks will be
		stored.  This is to avoid removable media.  For Windows you
		could use "ra:,rb:".  You can also use it for temp files,
		e.g., for Unix: "r/tmp".  Case is ignored.
							*shada-s*
	s	Maximum size of an item contents in KiB.  If zero then nothing
		is saved.  Unlike Vim this applies to all items, except for
		the buffer list and header.  Full item size is off by three
		unsigned integers: with `s10` maximum item size may be 1 byte
		(type: 7-bit integer) + 9 bytes (timestamp: up to 64-bit
		integer) + 3 bytes (item size: up to 16-bit integer because
		2^8 < 10240 < 2^16) + 10240 bytes (requested maximum item
		contents size) = 10253 bytes.

	Example: >vim
	    set shada='50,<1000,s100,:0,n~/nvim/shada
<
	'50		Marks will be remembered for the last 50 files you
			edited.
	<1000		Contents of registers (up to 1000 lines each) will be
			remembered.
	s100		Items with contents occupying more then 100 KiB are
			skipped.
	:0		Command-line history will not be saved.
	n~/nvim/shada	The name of the file to use is "~/nvim/shada".
	no /		Since '/' is not specified, the default will be used,
			that is, save all of the search history, and also the
			previous search and substitute patterns.
	no %		The buffer list will not be saved nor read back.
	no h		'hlsearch' highlighting will be restored.

	When setting 'shada' from an empty value you can use |:rshada| to
	load the contents of the file, this is not done automatically.

	This option cannot be set from a |modeline| or in the |sandbox|, for
	security reasons.

						*'shadafile'* *'sdf'*
'shadafile' 'sdf'	string	(default "")
			global
	When non-empty, overrides the file name used for |shada| (viminfo).
	When equal to "NONE" no shada file will be read or written.
	This option can be set with the |-i| command line flag.  The |--clean|
	command line flag sets it to "NONE".
	This option cannot be set from a |modeline| or in the |sandbox|, for
	security reasons.

						*'shell'* *'sh'* *E91*
'shell' 'sh'		string	(default $SHELL or "sh", Win32: "cmd.exe")
			global
	Name of the shell to use for ! and :! commands.  When changing the
	value also check these options: 'shellpipe', 'shellslash'
	'shellredir', 'shellquote', 'shellxquote' and 'shellcmdflag'.
	It is allowed to give an argument to the command, e.g.  "csh -f".
	See |option-backslash| about including spaces and backslashes.
	Environment variables are expanded |:set_env|.

	If the name of the shell contains a space, you need to enclose it in
	quotes.  Example with quotes: >vim
		set shell=\"c:\program\ files\unix\sh.exe\"\ -f
<	Note the backslash before each quote (to avoid starting a comment) and
	each space (to avoid ending the option value), so better use |:let-&|
	like this: >vim
		let &shell='"C:\Program Files\unix\sh.exe" -f'
<	Also

Title: Vim Option: Shared Data (Shada) - Removable Media, Item Size and Examples
Summary
This section continues the detailed configuration of the 'shada' option. It explains the 'r' parameter, which allows specifying paths on removable media for which marks should not be stored, and the 's' parameter, which sets the maximum size of item contents in KiB to be saved. An example demonstrates how to use 'shada' to configure marks, registers, item size, command-line history, and the shada file name. It mentions that the option can load file contents and cannot be set from a modeline or sandbox. It also details 'shadafile', which overrides the default shada file name, and 'shell', used to specify the shell for external commands.