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