Home Explore Blog CI



neovim

94th chunk of `runtime/doc/options.txt`
017f1cfe6bbe4a3cea6e7479d4d0fc5e8925682195be9d690000000100000faa
 whatever with "vim --clean" to get it right.

	Examples:
	Emulate standard status line with 'ruler' set >vim
	  set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P
<	Similar, but add ASCII value of char under the cursor (like "ga") >vim
	  set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
<	Display byte count and byte value, modified flag in red. >vim
	  set statusline=%<%f%=\ [%1*%M%*%n%R%H]\ %-19(%3l,%02c%03V%)%O'%02b'
	  hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red
<	Display a ,GZ flag if a compressed file is loaded >vim
	  set statusline=...%r%{VarExists('b:gzflag','\ [GZ]')}%h...
<	In the |:autocmd|'s: >vim
	  let b:gzflag = 1
<	And: >vim
	  unlet b:gzflag
<	And define this function: >vim
	  function VarExists(var, val)
	      if exists(a:var) | return a:val | else | return '' | endif
	  endfunction
<

						*'suffixes'* *'su'*
'suffixes' 'su'		string	(default ".bak,~,.o,.h,.info,.swp,.obj")
			global
	Files with these suffixes get a lower priority when multiple files
	match a wildcard.  See |suffixes|.  Commas can be used to separate the
	suffixes.  Spaces after the comma are ignored.  A dot is also seen as
	the start of a suffix.  To avoid a dot or comma being recognized as a
	separator, precede it with a backslash (see |option-backslash| about
	including spaces and backslashes).
	See 'wildignore' for completely ignoring files.
	The use of |:set+=| and |:set-=| is preferred when adding or removing
	suffixes from the list.  This avoids problems when a future version
	uses another default.

						*'suffixesadd'* *'sua'*
'suffixesadd' 'sua'	string	(default "")
			local to buffer
	Comma-separated list of suffixes, which are used when searching for a
	file for the "gf", "[I", etc. commands.  Example: >vim
		set suffixesadd=.java
<

				*'swapfile'* *'swf'* *'noswapfile'* *'noswf'*
'swapfile' 'swf'	boolean	(default on)
			local to buffer
	Use a swapfile for the buffer.  This option can be reset when a
	swapfile is not wanted for a specific buffer.  For example, with
	confidential information that even root must not be able to access.
	Careful: All text will be in memory:
		- Don't use this for big files.
		- Recovery will be impossible!
	A swapfile will only be present when |'updatecount'| is non-zero and
	'swapfile' is set.
	When 'swapfile' is reset, the swap file for the current buffer is
	immediately deleted.  When 'swapfile' is set, and 'updatecount' is
	non-zero, a swap file is immediately created.
	Also see |swap-file|.
	If you want to open a new buffer without creating a swap file for it,
	use the |:noswapfile| modifier.
	See 'directory' for where the swap file is created.

	This option is used together with 'bufhidden' and 'buftype' to
	specify special kinds of buffers.   See |special-buffers|.

						*'switchbuf'* *'swb'*
'switchbuf' 'swb'	string	(default "uselast")
			global
	This option controls the behavior when switching between buffers.
	This option is checked, when
	- jumping to errors with the |quickfix| commands (|:cc|, |:cn|, |:cp|,
	  etc.).
	- jumping to a tag using the |:stag| command.
	- opening a file using the |CTRL-W_f| or |CTRL-W_F| command.
	- jumping to a buffer using a buffer split command (e.g.  |:sbuffer|,
	  |:sbnext|, or |:sbrewind|).
	Possible values (comma-separated list):
	   useopen	If included, jump to the first open window in the
			current tab page that contains the specified buffer
			(if there is one).  Otherwise: Do not examine other
			windows.
	   usetab	Like "useopen", but also consider windows in other tab
			pages.
	   split	If included, split the current window before loading
			a buffer for a |quickfix| command that display errors.
			Otherwise: do not split, use current window (when used
			in the quickfix window: the previously used window or
			split if there is no other window).
	   vsplit	Just like "split" but split vertically.
	   newtab	Like "split", but open a new tab page.  Overrules
			"split" when both are present.
	   uselast	If included, jump to the previously

Title: Vim Options: 'suffixes', 'suffixesadd', 'swapfile', and 'switchbuf'
Summary
This section details several Vim options, providing explanations and examples for each. It covers 'suffixes' (file suffixes with lower priority), 'suffixesadd' (suffixes for searching files), 'swapfile' (enabling or disabling swap files for buffers, especially for sensitive information), and 'switchbuf' (controlling buffer switching behavior for commands like quickfix, stag, CTRL-W_f, and buffer splits). It also illustrates how to use these settings to tailor Vim's behavior to specific needs.