Mercurial > vim
comparison runtime/doc/options.txt @ 27903:d19b7aee1925
Update runtime files.
Commit: https://github.com/vim/vim/commit/c51cf0329809c7ae946c59d6f56699227efc9d1b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 26 12:25:45 2022 +0000
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Feb 2022 13:30:04 +0100 |
parents | ae38d2e81fca |
children | c968191a8557 |
comparison
equal
deleted
inserted
replaced
27902:8481c8908b5e | 27903:d19b7aee1925 |
---|---|
1140 Only normal file name characters can be used, "/\*?[|<>" are illegal. | 1140 Only normal file name characters can be used, "/\*?[|<>" are illegal. |
1141 | 1141 |
1142 If you like to keep a lot of backups, you could use a BufWritePre | 1142 If you like to keep a lot of backups, you could use a BufWritePre |
1143 autocommand to change 'backupext' just before writing the file to | 1143 autocommand to change 'backupext' just before writing the file to |
1144 include a timestamp. > | 1144 include a timestamp. > |
1145 :au BufWritePre * let &bex = '-' . strftime("%Y%b%d%X") . '~' | 1145 :au BufWritePre * let &bex = '-' .. strftime("%Y%b%d%X") .. '~' |
1146 < Use 'backupdir' to put the backup in a different directory. | 1146 < Use 'backupdir' to put the backup in a different directory. |
1147 | 1147 |
1148 *'backupskip'* *'bsk'* | 1148 *'backupskip'* *'bsk'* |
1149 'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*" | 1149 'backupskip' 'bsk' string (default: "$TMPDIR/*,$TMP/*,$TEMP/*" |
1150 Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*" | 1150 Unix: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*" |
1165 lose both the original file and what you were writing. Only disable | 1165 lose both the original file and what you were writing. Only disable |
1166 backups if you don't care about losing the file. | 1166 backups if you don't care about losing the file. |
1167 | 1167 |
1168 Note that environment variables are not expanded. If you want to use | 1168 Note that environment variables are not expanded. If you want to use |
1169 $HOME you must expand it explicitly, e.g.: > | 1169 $HOME you must expand it explicitly, e.g.: > |
1170 :let &backupskip = escape(expand('$HOME'), '\') . '/tmp/*' | 1170 :let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*' |
1171 | 1171 |
1172 < Note that the default also makes sure that "crontab -e" works (when a | 1172 < Note that the default also makes sure that "crontab -e" works (when a |
1173 backup would be made by renaming the original file crontab won't see | 1173 backup would be made by renaming the original file crontab won't see |
1174 the newly created file). Also see 'backupcopy' and |crontab|. | 1174 the newly created file). Also see 'backupcopy' and |crontab|. |
1175 | 1175 |
1216 use highlighting and show a border. | 1216 use highlighting and show a border. |
1217 | 1217 |
1218 The evaluation of the expression must not have side effects! | 1218 The evaluation of the expression must not have side effects! |
1219 Example: > | 1219 Example: > |
1220 function MyBalloonExpr() | 1220 function MyBalloonExpr() |
1221 return 'Cursor is at line ' . v:beval_lnum . | 1221 return 'Cursor is at line ' .. v:beval_lnum .. |
1222 \', column ' . v:beval_col . | 1222 \ ', column ' .. v:beval_col .. |
1223 \ ' of file ' . bufname(v:beval_bufnr) . | 1223 \ ' of file ' .. bufname(v:beval_bufnr) .. |
1224 \ ' on word "' . v:beval_text . '"' | 1224 \ ' on word "' .. v:beval_text .. '"' |
1225 endfunction | 1225 endfunction |
1226 set bexpr=MyBalloonExpr() | 1226 set bexpr=MyBalloonExpr() |
1227 set ballooneval | 1227 set ballooneval |
1228 < | 1228 < |
1229 Also see |balloon_show()|, it can be used if the content of the balloon | 1229 Also see |balloon_show()|, it can be used if the content of the balloon |
1535 The default value is taken from $CDPATH, with a "," prepended to look | 1535 The default value is taken from $CDPATH, with a "," prepended to look |
1536 in the current directory first. | 1536 in the current directory first. |
1537 If the default value taken from $CDPATH is not what you want, include | 1537 If the default value taken from $CDPATH is not what you want, include |
1538 a modified version of the following command in your vimrc file to | 1538 a modified version of the following command in your vimrc file to |
1539 override it: > | 1539 override it: > |
1540 :let &cdpath = ',' . substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g') | 1540 :let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g') |
1541 < This option cannot be set from a |modeline| or in the |sandbox|, for | 1541 < This option cannot be set from a |modeline| or in the |sandbox|, for |
1542 security reasons. | 1542 security reasons. |
1543 (parts of 'cdpath' can be passed to the shell to expand file names). | 1543 (parts of 'cdpath' can be passed to the shell to expand file names). |
1544 | 1544 |
1545 *'cedit'* | 1545 *'cedit'* |
1580 flag is present in 'viminfo'. Also used for Unicode conversion. | 1580 flag is present in 'viminfo'. Also used for Unicode conversion. |
1581 Example: > | 1581 Example: > |
1582 set charconvert=CharConvert() | 1582 set charconvert=CharConvert() |
1583 fun CharConvert() | 1583 fun CharConvert() |
1584 system("recode " | 1584 system("recode " |
1585 \ . v:charconvert_from . ".." . v:charconvert_to | 1585 \ .. v:charconvert_from .. ".." .. v:charconvert_to |
1586 \ . " <" . v:fname_in . " >" v:fname_out) | 1586 \ .. " <" .. v:fname_in .. " >" .. v:fname_out) |
1587 return v:shell_error | 1587 return v:shell_error |
1588 endfun | 1588 endfun |
1589 < The related Vim variables are: | 1589 < The related Vim variables are: |
1590 v:charconvert_from name of the current encoding | 1590 v:charconvert_from name of the current encoding |
1591 v:charconvert_to name of the desired encoding | 1591 v:charconvert_to name of the desired encoding |
4885 global | 4885 global |
4886 {only available when compiled with the |+menu| and | 4886 {only available when compiled with the |+menu| and |
4887 |+multi_lang| features} | 4887 |+multi_lang| features} |
4888 Language to use for menu translation. Tells which file is loaded | 4888 Language to use for menu translation. Tells which file is loaded |
4889 from the "lang" directory in 'runtimepath': > | 4889 from the "lang" directory in 'runtimepath': > |
4890 "lang/menu_" . &langmenu . ".vim" | 4890 "lang/menu_" .. &langmenu .. ".vim" |
4891 < (without the spaces). For example, to always use the Dutch menus, no | 4891 < (without the spaces). For example, to always use the Dutch menus, no |
4892 matter what $LANG is set to: > | 4892 matter what $LANG is set to: > |
4893 :set langmenu=nl_NL.ISO_8859-1 | 4893 :set langmenu=nl_NL.ISO_8859-1 |
4894 < When 'langmenu' is empty, |v:lang| is used. | 4894 < When 'langmenu' is empty, |v:lang| is used. |
4895 Only normal file name characters can be used, "/\*?[|<>" are illegal. | 4895 Only normal file name characters can be used, "/\*?[|<>" are illegal. |
5899 < To add the current directory use: > | 5899 < To add the current directory use: > |
5900 :set path+= | 5900 :set path+= |
5901 < To use an environment variable, you probably need to replace the | 5901 < To use an environment variable, you probably need to replace the |
5902 separator. Here is an example to append $INCL, in which directory | 5902 separator. Here is an example to append $INCL, in which directory |
5903 names are separated with a semi-colon: > | 5903 names are separated with a semi-colon: > |
5904 :let &path = &path . "," . substitute($INCL, ';', ',', 'g') | 5904 :let &path = &path .. "," .. substitute($INCL, ';', ',', 'g') |
5905 < Replace the ';' with a ':' or whatever separator is used. Note that | 5905 < Replace the ';' with a ':' or whatever separator is used. Note that |
5906 this doesn't work when $INCL contains a comma or white space. | 5906 this doesn't work when $INCL contains a comma or white space. |
5907 | 5907 |
5908 *'perldll'* | 5908 *'perldll'* |
5909 'perldll' string (default depends on the build) | 5909 'perldll' string (default depends on the build) |
8316 When this option contains printf-style '%' items, they will be | 8316 When this option contains printf-style '%' items, they will be |
8317 expanded according to the rules used for 'statusline'. | 8317 expanded according to the rules used for 'statusline'. |
8318 This option cannot be set in a modeline when 'modelineexpr' is off. | 8318 This option cannot be set in a modeline when 'modelineexpr' is off. |
8319 | 8319 |
8320 Example: > | 8320 Example: > |
8321 :auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p") | 8321 :auto BufEnter * let &titlestring = hostname() .. "/" .. expand("%:p") |
8322 :set title titlestring=%<%F%=%l/%L-%P titlelen=70 | 8322 :set title titlestring=%<%F%=%l/%L-%P titlelen=70 |
8323 < The value of 'titlelen' is used to align items in the middle or right | 8323 < The value of 'titlelen' is used to align items in the middle or right |
8324 of the available space. | 8324 of the available space. |
8325 Some people prefer to have the file name first: > | 8325 Some people prefer to have the file name first: > |
8326 :set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%) | 8326 :set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:~:.:h\")})%)%(\ %a%) |