# HG changeset patch # User Bram Moolenaar # Date 1633380305 -7200 # Node ID 9c221ad9634ae928573a03bfe9756c66689542e8 # Parent 14ca7cc78a565d15431cf346a8a07415e6df76c6 Update runtime files Commit: https://github.com/vim/vim/commit/6e649224926bbc1df6a4fdfa7a96b4acb1f8bee0 Author: Bram Moolenaar Date: Mon Oct 4 21:32:54 2021 +0100 Update runtime files diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -97,6 +97,7 @@ runtime/ftplugin/markdown.vim @tpope runtime/ftplugin/matlab.vim @cecamp runtime/ftplugin/meson.vim @Liambeguin runtime/ftplugin/modula3.vim @dkearns +runtime/ftplugin/nginx.vim @chr4 runtime/ftplugin/nroff.vim @a-vrma runtime/ftplugin/nsis.vim @k-takata runtime/ftplugin/octave.vim @dkearns @@ -117,20 +118,39 @@ runtime/ftplugin/typescriptreact.vim @dk runtime/ftplugin/xml.vim @chrisbra runtime/ftplugin/zsh.vim @chrisbra runtime/indent/bst.vim @tpope +runtime/indent/cdl.vim @dkearns +runtime/indent/config.vim @dkearns +runtime/indent/css.vim @dkearns runtime/indent/cucumber.vim @tpope +runtime/indent/d.vim @dkearns runtime/indent/dosbatch.vim @k-takata +runtime/indent/dtd.vim @dkearns +runtime/indent/dylan.vim @dkearns +runtime/indent/elm.vim @andys8 runtime/indent/eruby.vim @tpope @dkearns +runtime/indent/eterm.vim @dkearns +runtime/indent/framescript.vim @dkearns runtime/indent/gitconfig.vim @tpope runtime/indent/haml.vim @tpope +runtime/indent/idlang.vim @dkearns +runtime/indent/ld.vim @dkearns runtime/indent/liquid.vim @tpope +runtime/indent/make.vim @dkearns runtime/indent/meson.vim @Liambeguin +runtime/indent/mma.vim @dkearns +runtime/indent/nginx.vim @chr4 runtime/indent/nsis.vim @k-takata +runtime/indent/occam.vim @dkearns +runtime/indent/postscr.vim @dkearns +runtime/indent/prolog.vim @dkearns runtime/indent/ps1.vim @heaths +runtime/indent/readline.vim @dkearns runtime/indent/ruby.vim @AndrewRadev @dkearns runtime/indent/sass.vim @tpope runtime/indent/scss.vim @tpope runtime/indent/sh.vim @chrisbra runtime/indent/systemverilog.vim @Kocha +runtime/indent/tcl.vim @dkearns runtime/indent/teraterm.vim @k-takata runtime/indent/xml.vim @chrisbra runtime/indent/zsh.vim @chrisbra @@ -192,6 +212,7 @@ runtime/syntax/markdown.vim @tpope runtime/syntax/meson.vim @Liambeguin runtime/syntax/modula3.vim @dkearns runtime/syntax/netrw.vim @cecamp +runtime/syntax/nginx.vim @chr4 runtime/syntax/nroff.vim @jmarshall runtime/syntax/nsis.vim @k-takata runtime/syntax/pascal.vim @dkearns diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1751,7 +1751,8 @@ fun! s:NetrwOptionsSafe(islocal) if &cpo =~ 'a' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'a','','g')) | endif if &cpo =~ 'A' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'A','','g')) | endif setl fo=nroql2 - call s:NetrwSetSafeSetting("&go","begmr") + " call s:NetrwSetSafeSetting("&go","begmr") + if &go =~ '\ca' | call s:NetrwSetSafeSetting("&go",substitute(&go,'\ca','','g')) | endif call s:NetrwSetSafeSetting("&l:hid",0) call s:NetrwSetSafeSetting("&l:im",0) setl isk+=@ isk+=* isk+=/ diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 8.2. Last change: 2021 Aug 01 +*autocmd.txt* For Vim version 8.2. Last change: 2021 Oct 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -940,7 +940,7 @@ ModeChanged After changing the mode. T have the value of new_mode when the event was last triggered. Usage example to use relative line numbers - when entering visual mode: > + when entering Visual mode: > :autocmd ModeChanged *:v set relativenumber < *OptionSet* OptionSet After setting an option. The pattern is @@ -1502,6 +1502,13 @@ Example: > This prevents having the autocommands defined twice (e.g., after sourcing the .vimrc file again). + *FileExplorer* +There is one group that is recognized by Vim: FileExplorer. If this group +exists Vim assumes that editing a directory is possible and will trigger a +plugin that lists the files in that directory. This is used by the |netrw| +plugin. This allows you to do: > + browse edit + ============================================================================== 9. Executing autocommands *autocmd-execute* diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 8.2. Last change: 2021 Jul 25 +*editing.txt* For Vim version 8.2. Last change: 2021 Oct 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1225,7 +1225,9 @@ If you want to always use ":confirm", se |:diffsplit|, |:diffpatch|, |:open|, |:pedit|, |:redir|, |:source|, |:update|, |:visual|, |:vsplit|, and |:qall| if 'confirm' is set. - {only in Win32, Athena, Motif, GTK and Mac GUI} + {only in Win32, Athena, Motif, GTK and Mac GUI, in + console `browse edit` works if the FileExplorer + autocommand group exists} When ":browse" is not possible you get an error message. If the |+browse| feature is missing or the {command} doesn't support browsing, the {command} is diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2021 Sep 19 +*eval.txt* For Vim version 8.2. Last change: 2021 Oct 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1417,7 +1417,7 @@ A string constant accepts these special \U.... same as \u but allows up to 8 hex numbers. \b backspace \e escape -\f formfeed +\f formfeed 0x0C \n newline \r return \t tab @@ -1426,7 +1426,7 @@ A string constant accepts these special \ Special key named "xxx". e.g. "\" for CTRL-W. This is for use in mappings, the 0x80 byte is escaped. To use the double quote character it must be escaped: "". - Don't use to get a utf-8 character, use \uxxxx as + Don't use to get a UTF-8 character, use \uxxxx as mentioned above. \<*xxx> Like \ but prepends a modifier instead of including it in the character. E.g. "\" is one character 0x17 while "\<*C-w>" is four @@ -2516,7 +2516,7 @@ ch_setoptions({handle}, {options}) ch_status({handle} [, {options}]) String status of channel {handle} changenr() Number current change number -char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr} +char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in {expr} charclass({string}) Number character class of {string} charcol({expr}) Number column number of cursor or mark charidx({string}, {idx} [, {countcc}]) @@ -2769,7 +2769,7 @@ mkdir({name} [, {path} [, {prot}]]) mode([expr]) String current editing mode mzeval({expr}) any evaluate |MzScheme| expression nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} -nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr} +nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr} or({expr}, {expr}) Number bitwise OR pathshorten({expr} [, {len}]) String shorten directory names in a path perleval({expr}) any evaluate |Perl| expression @@ -2787,7 +2787,7 @@ popup_getoptions({id}) Dict get options popup_getpos({id}) Dict get position of popup window {id} popup_hide({id}) none hide popup menu {id} popup_list() List get a list of window IDs of all popups -popup_locate({row}, {col}) Number get window ID of popup at position +popup_locate({row}, {col}) Number get window ID of popup at position popup_menu({what}, {options}) Number create a popup window used as a menu popup_move({id}, {options}) none set position of popup window {id} popup_notification({what}, {options}) @@ -2899,7 +2899,7 @@ setenv({name}, {val}) none set environm setfperm({fname}, {mode}) Number set {fname} file permissions to {mode} setline({lnum}, {line}) Number set line {lnum} to {line} setloclist({nr}, {list} [, {action}]) - Number modify location list using {list} + Number modify location list using {list} setloclist({nr}, {list}, {action}, {what}) Number modify specific location list props setmatches({list} [, {win}]) Number restore a list of matches @@ -2959,7 +2959,7 @@ srand([{expr}]) List get seed for |ran state([{what}]) String current state of Vim str2float({expr} [, {quoted}]) Float convert String to Float str2list({expr} [, {utf8}]) List convert each character of {expr} to - ASCII/UTF8 value + ASCII/UTF-8 value str2nr({expr} [, {base} [, {quoted}]]) Number convert String to Number strcharlen({expr}) Number character length of the String {expr} @@ -3656,7 +3656,7 @@ char2nr({string} [, {utf8}]) *char2n Example for "utf-8": > char2nr("á") returns 225 char2nr("á"[0]) returns 195 -< With {utf8} set to TRUE, always treat as utf-8 characters. +< When {utf8} is TRUE, always treat as UTF-8 characters. A combining character is a separate character. |nr2char()| does the opposite. To turn a string into a list of character numbers: > @@ -4283,7 +4283,7 @@ digraph_getlist([{listall}]) *digraph digraph_set({chars}, {digraph}) *digraph_set()* *E1205* Add digraph {chars} to the list. {chars} must be a string - with two characters. {digraph} is a string with one utf-8 + with two characters. {digraph} is a string with one UTF-8 encoded character. Be careful, composing characters are NOT ignored. This function is similar to |:digraphs| command, but useful to add digraphs start with a white space. @@ -7249,8 +7249,8 @@ list2str({list} [, {utf8}]) *list2str < |str2list()| does the opposite. When {utf8} is omitted or zero, the current 'encoding' is used. - With {utf8} is 1, always return utf-8 characters. - With utf-8 composing characters work as expected: > + When {utf8} is TRUE, always return UTF-8 characters. + With UTF-8 composing characters work as expected: > list2str([97, 769]) returns "á" < Can also be used as a |method|: > @@ -7492,7 +7492,7 @@ maparg({name} [, {mode} [, {abbr} [, {di "lhs" The {lhs} of the mapping as it would be typed "lhsraw" The {lhs} of the mapping as raw bytes "lhsrawalt" The {lhs} of the mapping as raw bytes, alternate - form, only present when it differs from "lhsraw" + form, only present when it differs from "lhsraw" "rhs" The {rhs} of the mapping as typed. "silent" 1 for a |:map-silent| mapping, else 0. "noremap" 1 if the {rhs} of the mapping is not remappable. @@ -8154,7 +8154,7 @@ nr2char({expr} [, {utf8}]) *nr2char() < When {utf8} is omitted or zero, the current 'encoding' is used. Example for "utf-8": > nr2char(300) returns I with bow character -< With {utf8} set to 1, always return utf-8 characters. +< When {utf8} is TRUE, always return UTF-8 characters. Note that a NUL character in the file is specified with nr2char(10), because NULs are represented with newline characters. nr2char(0) is a real NUL and terminates the @@ -9635,7 +9635,7 @@ setcellwidths({list}) *setcellwidths tells Vim how wide characters are, counted in screen cells. This overrides 'ambiwidth'. Example: > setcellwidths([[0xad, 0xad, 1], - \ [0x2194, 0x2199, 2]]) + \ [0x2194, 0x2199, 2]]) < *E1109* *E1110* *E1111* *E1112* *E1113* The {list} argument is a list of lists with each three @@ -10549,7 +10549,7 @@ state([{what}]) *state()* w blocked on waiting, e.g. ch_evalexpr(), ch_read() and ch_readraw() when reading json S not triggering SafeState or SafeStateAgain, e.g. after - |f| or a count + |f| or a count c callback invoked, including timer (repeats for recursiveness up to "ccc") s screen has scrolled for messages @@ -10584,8 +10584,8 @@ str2list({string} [, {utf8}]) *str2l < |list2str()| does the opposite. When {utf8} is omitted or zero, the current 'encoding' is used. - With {utf8} set to 1, always treat the String as utf-8 - characters. With utf-8 composing characters are handled + When {utf8} is TRUE, always treat the String as UTF-8 + characters. With UTF-8 composing characters are handled properly: > str2list("á") returns [97, 769] @@ -13120,7 +13120,7 @@ text... literal then the items also cannot be changed: > const ll = [1, 2, 3] let ll[1] = 5 " Error! -< Nested references are not locked: > +< Nested references are not locked: > let lvar = ['a'] const lconst = [0, lvar] let lconst[0] = 2 " Error! @@ -13174,8 +13174,8 @@ text... Example with [depth] 0: > let mylist = [1, 2, 3] lockvar 0 mylist - let mylist[0] = 77 " OK - call add(mylist, 4] " OK + let mylist[0] = 77 " OK + call add(mylist, 4] " OK let mylist = [7, 8, 9] " Error! < *E743* For unlimited depth use [!] and omit [depth]. diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 8.2. Last change: 2021 Mar 11 +*filetype.txt* For Vim version 8.2. Last change: 2021 Sep 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -545,7 +545,7 @@ One command, :DiffGitCached, is provided in the preview window. It is equivalent to calling "git diff --cached" plus any arguments given to the command. -GPROF +GPROF *ft-gprof-plugin* The gprof filetype plugin defines a mapping to jump from a function entry in the gprof flat profile or from a function entry in the call graph diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 8.2. Last change: 2020 Dec 29 +*intro.txt* For Vim version 8.2. Last change: 2021 Sep 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -421,7 +421,6 @@ notation meaning equivalent decimal tab CTRL-I 9 *tab* *Tab* *linefeed* linefeed CTRL-J 10 (used for ) - formfeed CTRL-L 12 *formfeed* carriage return CTRL-M 13 *carriage-return* same as ** same as ** diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,4 +1,4 @@ -*mbyte.txt* For Vim version 8.2. Last change: 2021 Apr 05 +*mbyte.txt* For Vim version 8.2. Last change: 2021 Oct 04 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -1132,7 +1132,7 @@ This file explains what characters are a and what the keymaps are to get those characters: glyph encoding keymap ~ -Char utf-8 cp1255 hebrew hebrewp name ~ +Char UTF-8 cp1255 hebrew hebrewp name ~ א 0x5d0 0xe0 t a 'alef ב 0x5d1 0xe1 c b bet ג 0x5d2 0xe2 d g gimel @@ -1185,11 +1185,11 @@ Vowel marks and special punctuation: ױ 0x5f1 0xd5 VY VY vav-yod ײ 0x5f2 0xd6 YY YY yod-yod -The following are only available in utf-8 +The following are only available in UTF-8 Cantillation marks: glyph -Char utf-8 hebrew name +Char UTF-8 hebrew name ב֑ 0x591 C: etnahta ב֒ 0x592 Cs segol ב֓ 0x593 CS shalshelet @@ -1300,7 +1300,7 @@ 16-bit words. Vim can support all of th internally. Vim has comprehensive UTF-8 support. It works well in: -- xterm with utf-8 support enabled +- xterm with UTF-8 support enabled - Athena, Motif and GTK GUI - MS-Windows GUI - several other platforms @@ -1313,13 +1313,13 @@ is no longer relevant in the GTK+ 2 GUI. *bom-bytes* When reading a file a BOM (Byte Order Mark) can be used to recognize the Unicode encoding: - EF BB BF utf-8 - FE FF utf-16 big endian - FF FE utf-16 little endian - 00 00 FE FF utf-32 big endian - FF FE 00 00 utf-32 little endian + EF BB BF UTF-8 + FE FF UTF-16 big endian + FF FE UTF-16 little endian + 00 00 FE FF UTF-32 big endian + FF FE 00 00 UTF-32 little endian -Utf-8 is the recommended encoding. Note that it's difficult to tell utf-16 +UTF-8 is the recommended encoding. Note that it's difficult to tell utf-16 and utf-32 apart. Utf-16 is often used on MS-Windows, utf-32 is not widespread as file format. @@ -1365,8 +1365,8 @@ Useful commands: STARTING VIM -If your current locale is in an utf-8 encoding, Vim will automatically start -in utf-8 mode. +If your current locale is in an UTF-8 encoding, Vim will automatically start +in UTF-8 mode. If you are using another locale: > @@ -1399,10 +1399,10 @@ Motif. Use the ":hi Menu font={fontname TYPING UTF-8 *utf-8-typing* If you are using X-Windows, you should find an input method that supports -utf-8. +UTF-8. -If your system does not provide support for typing utf-8, you can use the -'keymap' feature. This allows writing a keymap file, which defines a utf-8 +If your system does not provide support for typing UTF-8, you can use the +'keymap' feature. This allows writing a keymap file, which defines a UTF-8 character as a sequence of ASCII characters. See |mbyte-keymap|. Another method is to set the current locale to the language you want to use diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -1,4 +1,4 @@ -*print.txt* For Vim version 8.2. Last change: 2020 Aug 15 +*print.txt* For Vim version 8.2. Last change: 2021 Oct 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -717,7 +717,7 @@ 2. Paper flipping. When turning over th ============================================================================== 8. Formfeed Characters *printing-formfeed* -By default Vim does not do any special processing of |formfeed| control +By default Vim does not do any special processing of formfeed control characters. Setting the 'printoptions' formfeed item will make Vim recognize formfeed characters and continue printing the current line at the beginning of the first line on a new page. The use of formfeed characters provides diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4943,6 +4943,7 @@ FileChangedRO autocmd.txt /*FileChangedR FileChangedShell autocmd.txt /*FileChangedShell* FileChangedShellPost autocmd.txt /*FileChangedShellPost* FileEncoding autocmd.txt /*FileEncoding* +FileExplorer autocmd.txt /*FileExplorer* FileReadCmd autocmd.txt /*FileReadCmd* FileReadPost autocmd.txt /*FileReadPost* FileReadPre autocmd.txt /*FileReadPre* @@ -6550,7 +6551,6 @@ format-bullet-list tips.txt /*format-bul format-comments change.txt /*format-comments* format-formatexpr change.txt /*format-formatexpr* formatting change.txt /*formatting* -formfeed intro.txt /*formfeed* fortran.vim syntax.txt /*fortran.vim* friendship intro.txt /*friendship* frombook usr_01.txt /*frombook* @@ -6609,6 +6609,7 @@ ft-fortran-plugin filetype.txt /*ft-fort ft-fortran-syntax syntax.txt /*ft-fortran-syntax* ft-fvwm-syntax syntax.txt /*ft-fvwm-syntax* ft-gitcommit-plugin filetype.txt /*ft-gitcommit-plugin* +ft-gprof-plugin filetype.txt /*ft-gprof-plugin* ft-groff-syntax syntax.txt /*ft-groff-syntax* ft-gsp-syntax syntax.txt /*ft-gsp-syntax* ft-haskell-syntax syntax.txt /*ft-haskell-syntax* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.2. Last change: 2021 Sep 20 +*todo.txt* For Vim version 8.2. Last change: 2021 Sep 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -429,6 +429,9 @@ undo result wrong: Masato Nishihata, #47 After recovering from a swap file the undofile should not be used, it causes corruption. (#6631) +When the computer crashes while writing the undofile, the contents may be +lost. Write to a temp file, fsync and rename. (#8879) + When 'lazyredraw' is set sometimes the title is not updated. (Jason Franklin, 2020 Feb 3) Looks like a race condition. diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2021 Sep 21 +" Last Change: 2021 Oct 03 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -2008,14 +2008,15 @@ au BufNewFile,BufRead *.ws[fc] setf ws " XHTML au BufNewFile,BufRead *.xhtml,*.xht setf xhtml -" X Pixmap (dynamically sets colors, use BufEnter to make it work better) -au BufEnter *.xpm +" X Pixmap (dynamically sets colors, this used to trigger on BufEnter to make +" it work better, but that breaks setting 'filetype' manually) +au BufNewFile,BufRead *.xpm \ if getline(1) =~ "XPM2" | \ setf xpm2 | \ else | \ setf xpm | \ endif -au BufEnter *.xpm2 setf xpm2 +au BufNewFile,BufRead *.xpm2 setf xpm2 " XFree86 config au BufNewFile,BufRead XF86Config diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -2,7 +2,7 @@ " Language: man " Maintainer: Jason Franklin " Maintainer: SungHyun Nam -" Last Change: 2020 Oct 09 +" Last Change: 2021 Sep 26 " To make the ":Man" command available before editing a manual page, source " this script from your startup vimrc file. diff --git a/runtime/ftplugin/nginx.vim b/runtime/ftplugin/nginx.vim new file mode 100644 --- /dev/null +++ b/runtime/ftplugin/nginx.vim @@ -0,0 +1,6 @@ +" Vim filetype plugin +" Language: nginx.conf +" Maintainer: Chris Aumann +" Last Change: Apr 15, 2017 + +setlocal commentstring=#\ %s diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim --- a/runtime/ftplugin/spec.vim +++ b/runtime/ftplugin/spec.vim @@ -18,8 +18,8 @@ if !exists("no_plugin_maps") && !exists( endif endif -if !hasmapto("call SpecChangelog(\"\")") - noremap