# HG changeset patch # User Bram Moolenaar # Date 1608728404 -3600 # Node ID fab58304f77dc05ca460cb1e9e46878d13d6ee30 # Parent e438ec7ffd5dd248ead8552f1346448f8ea16d93 Update runtime files. Commit: https://github.com/vim/vim/commit/4072ba571babd733d1800c082416fe8fe3c28ed7 Author: Bram Moolenaar Date: Wed Dec 23 13:56:35 2020 +0100 Update runtime files. diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -19,8 +19,8 @@ runtime/autoload/netrwSettings.vim @ceca runtime/autoload/rubycomplete.vim @segfault @dkearns runtime/autoload/tar.vim @cecamp runtime/autoload/vimball.vim @cecamp +runtime/autoload/xmlformat.vim @chrisbra runtime/autoload/zip.vim @cecamp -runtime/autoload/xmlformat.vim @chrisbra runtime/compiler/checkstyle.vim @dkearns runtime/compiler/cucumber.vim @tpope runtime/compiler/dart.vim @dkearns @@ -77,6 +77,7 @@ runtime/ftplugin/gitcommit.vim @tpope runtime/ftplugin/gitconfig.vim @tpope runtime/ftplugin/gitrebase.vim @tpope runtime/ftplugin/gitsendemail.vim @tpope +runtime/ftplugin/gprof.vim @dpelle runtime/ftplugin/haml.vim @tpope runtime/ftplugin/hgcommit.vim @k-takata runtime/ftplugin/javascript.vim @dkearns @@ -91,13 +92,13 @@ runtime/ftplugin/pdf.vim @tpope runtime/ftplugin/ruby.vim @tpope @dkearns runtime/ftplugin/sass.vim @tpope runtime/ftplugin/scss.vim @tpope +runtime/ftplugin/spec.vim @ignatenkobrain runtime/ftplugin/tmux.vim @ericpruitt runtime/ftplugin/typescript.vim @dkearns runtime/ftplugin/typescriptreact.vim @dkearns runtime/ftplugin/xml.vim @chrisbra runtime/ftplugin/zsh.vim @chrisbra runtime/indent/bst.vim @tpope -runtime/syntax/cs.vim @nickspoons runtime/indent/cucumber.vim @tpope runtime/indent/dosbatch.vim @k-takata runtime/indent/eruby.vim @tpope @dkearns @@ -109,9 +110,11 @@ runtime/indent/ruby.vim @AndrewRadev @ runtime/indent/sass.vim @tpope runtime/indent/scss.vim @tpope runtime/indent/sh.vim @chrisbra +runtime/indent/teraterm.vim @k-takata runtime/indent/xml.vim @chrisbra runtime/indent/zsh.vim @chrisbra -runtime/indent/teraterm.vim @k-takata +runtime/keymap/tamil_tscii.vim @yegappan +runtime/pack/dist/opt/cfilter/plugin/cfilter.vim @yegappan runtime/pack/dist/opt/matchit/ @chrisbra runtime/plugin/getscriptPlugin.vim @cecamp runtime/plugin/logiPat.vim @cecamp @@ -119,17 +122,22 @@ runtime/plugin/netrwPlugin.vim @cecamp runtime/plugin/tarPlugin.vim @cecamp runtime/plugin/vimballPlugin.vim @cecamp runtime/plugin/zipPlugin.vim @cecamp +runtime/syntax/aidl.vim @dpelle runtime/syntax/amiga.vim @cecamp runtime/syntax/asm.vim @dkearns runtime/syntax/asmh8300.vim @dkearns runtime/syntax/awk.vim @dkearns runtime/syntax/bst.vim @tpope +runtime/syntax/cabal.vim @coot runtime/syntax/cabalconfig.vim @coot runtime/syntax/cabalproject.vim @coot runtime/syntax/cs.vim @nickspoons +runtime/syntax/cs.vim @nickspoons runtime/syntax/csh.vim @cecamp runtime/syntax/cucumber.vim @tpope +runtime/syntax/datascript.vim @dpelle runtime/syntax/dcl.vim @cecamp +runtime/syntax/doxygen.vim @frogonwheels runtime/syntax/dtd.vim @chrisbra runtime/syntax/elmfilt.vim @cecamp runtime/syntax/eruby.vim @tpope @dkearns @@ -138,6 +146,7 @@ runtime/syntax/git.vim @tpope runtime/syntax/gitcommit.vim @tpope runtime/syntax/gitconfig.vim @tpope runtime/syntax/gitrebase.vim @tpope +runtime/syntax/gprof.vim @dpelle runtime/syntax/haml.vim @tpope runtime/syntax/haskell.vim @coot runtime/syntax/hgcommit.vim @k-takata @@ -163,6 +172,7 @@ runtime/syntax/sass.vim @tpope runtime/syntax/scss.vim @tpope runtime/syntax/sh.vim @cecamp runtime/syntax/sm.vim @cecamp +runtime/syntax/spec.vim @ignatenkobrain runtime/syntax/sqloracle.vim @chrisbra runtime/syntax/sshdconfig.vim @Jakuje runtime/syntax/tags.vim @cecamp @@ -174,9 +184,15 @@ runtime/syntax/vim.vim @cecamp runtime/syntax/wget.vim @dkearns runtime/syntax/xbl.vim @dkearns runtime/syntax/xmath.vim @cecamp +runtime/syntax/xml.vim @chrisbra runtime/syntax/xslt.vim @Boobies -runtime/syntax/xml.vim @chrisbra runtime/syntax/xxd.vim @cecamp runtime/syntax/yacc.vim @cecamp runtime/syntax/zsh.vim @chrisbra +runtime/tutor/tutor.eo @dpelle +runtime/tutor/tutor.eo.utf-8 @dpelle +runtime/tutor/tutor.fr @dpelle +runtime/tutor/tutor.fr.utf-8 @dpelle src/po/de.po @chrisbra +src/po/eo.po @dpelle +src/po/fr.po @dpelle diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -1,16 +1,7 @@ -![Vim Logo](https://github.com/vim/vim/blob/master/runtime/vimlogo.gif) - -[![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) -[![Travis Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim) -[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) -[![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) -[![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) -[![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) -[![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) -[![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) -[![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) - -For translations of this README see the end. +| | | | +| ---- | ---- | ----: | +| [![Vim Logo](https://github.com/vim/vim/raw/master/runtime/vimlogo.gif)](https://www.vim.org) |     | [![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Travis Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) [![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) [![Fossies codespell report](https://fossies.org/linux/test/vim-master.tar.gz/codespell.svg)](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html) | +| | | For translations of this README see the end. | ## What is Vim? ## 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: 2020 Dec 10 +*autocmd.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -851,6 +851,8 @@ FuncUndefined When a user function is when it's used. The pattern is matched against the function name. Both and are set to the name of the function. + Not triggered when compiling a |Vim9| + function. NOTE: When writing Vim scripts a better alternative is to use an autoloaded function. See |autoload-functions|. 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: 2020 Oct 23 +*editing.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1033,7 +1033,7 @@ original file fails, there will be an er lost the original file. *DOS-format-write* -If the 'fileformat' is "dos", is used for . This is default +If the 'fileformat' is "dos", is used for . This is default for Win32. On other systems the message "[dos format]" is shown to remind you that an unusual was used. *Unix-format-write* @@ -1419,8 +1419,8 @@ There are a few things to remember when the file. It is also possible that you get an "out of memory" error when reading the file. - Make sure the 'binary' option is set BEFORE loading the - file. Otherwise both and are considered to end a line - and when the file is written the will be replaced with . + file. Otherwise both and are considered to end a line + and when the file is written the will be replaced with . - characters are shown on the screen as ^@. You can enter them with "CTRL-V CTRL-@" or "CTRL-V 000" - To insert a character in the file split a line. When writing the 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: 2020 Dec 02 +*eval.txt* For Vim version 8.2. Last change: 2020 Dec 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4740,7 +4740,8 @@ fnamemodify({fname}, {mods}) *fnamemo :echo fnamemodify("main.c", ":p:h") < results in: > /home/mool/vim/vim/src -< Note: Environment variables don't work in {fname}, use +< If {mods} is empty then {fname} is returned. + Note: Environment variables don't work in {fname}, use |expand()| first then. Can also be used as a |method|: > @@ -5143,7 +5144,10 @@ getchar([expr]) *getchar()* |xterm-bracketed-paste|. There is no prompt, you will somehow have to make clear to the - user that a character has to be typed. + user that a character has to be typed. The screen is not + redrawn, e.g. when resizing the window. When using a popup + window it should work better with a |popup-filter|. + There is no mapping for the character. Key codes are replaced, thus when the user presses the key you get the code for the key, not the raw character @@ -10842,6 +10846,8 @@ timer_start({time}, {callback} [, {optio function or a |Funcref|. It is called with one argument, which is the timer ID. The callback is only invoked when Vim is waiting for input. + If you want to show a message look at |popup_notification()| + to avoid intefering with what the user is doing. {options} is a dictionary. Supported entries: "repeat" Number of times to repeat calling the diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 8.2. Last change: 2020 Dec 05 +*helphelp.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -92,9 +92,9 @@ 1. Help commands *online-help* :help k| only < Note that a space before the '|' is seen as part of the ":help" argument. - You can also use or to separate the help + You can also use or to separate the help command from a following command. You need to type - CTRL-V first to insert the or . Example: > + CTRL-V first to insert the or . Example: > :help soonly :h[elp]! [subject] Like ":help", but in non-English help files prefer to 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 Aug 15 +*intro.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -434,7 +434,7 @@ notation meaning equivalent decimal command sequence intro ALT-Esc 155 ** CSI when typed in the GUI ** - end-of-line (can be , or , + end-of-line (can be , or , depends on system and 'fileformat') ** cursor-up *cursor-up* *cursor_up* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.2. Last change: 2020 Oct 10 +*options.txt* For Vim version 8.2. Last change: 2020 Dec 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2801,6 +2801,7 @@ A jump table for the options with a shor toggled each time the flag is given. See |complex-change|. See also 'gdefault' option. Switching this option on may break plugins! + This option is not used in |Vim9| script. *'emoji'* *'emo'* *'noemoji'* *'noemo'* 'emoji' 'emo' boolean (default: on) @@ -3121,7 +3122,7 @@ A jump table for the options with a shor local to buffer This gives the of the current buffer, which is used for reading/writing the buffer from/to a file: - dos + dos unix mac When "dos" is used, CTRL-Z at the end of a file is ignored. @@ -3570,6 +3571,7 @@ A jump table for the options with a shor DEPRECATED: Setting this option may break plugins that are not aware of this option. Also, many users get confused that adding the /g flag has the opposite effect of that it normally does. + This option is not used in |Vim9| script. *'grepformat'* *'gfm'* 'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m") @@ -4943,6 +4945,8 @@ A jump table for the options with a shor Only switch it off when working with old Vi scripts. In any other situation write patterns that work when 'magic' is on. Include "\M" when you want to |/\M|. + In |Vim9| script the value of 'magic' is ignored, patterns behave like + it is always set. *'makeef'* *'mef'* 'makeef' 'mef' string (default: "") diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 8.2. Last change: 2020 Sep 23 +*starting.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -996,7 +996,7 @@ version 5.0) are not recognized. MS-Windows line separators ~ -On MS-Windows, Vim assumes that all the vimrc files have pairs as +On MS-Windows, Vim assumes that all the vimrc files have pairs as line separators. This will give problems if you have a file with only s and have a line like ":map xx yy^M". The trailing ^M will be ignored. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.2. Last change: 2020 Dec 04 +*syntax.txt* For Vim version 8.2. Last change: 2020 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -66,8 +66,8 @@ This command also sources the |menu.vim| will start soon. See |'go-M'| about avoiding that. *:syn-on* *:syntax-on* -The `:syntax enable` command will keep your current color settings. This -allows using `:highlight` commands to set your preferred colors before or +The `:syntax enable` command will keep most of your current color settings. +This allows using `:highlight` commands to set your preferred colors before or after using this command. If you want Vim to overrule your settings with the defaults, use: > :syntax on diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -5151,10 +5151,13 @@ VIMINIT starting.txt /*VIMINIT* VMS os_vms.txt /*VMS* Vi intro.txt /*Vi* View starting.txt /*View* +Vim9 vim9.txt /*Vim9* VimEnter autocmd.txt /*VimEnter* VimLeave autocmd.txt /*VimLeave* VimLeavePre autocmd.txt /*VimLeavePre* VimResized autocmd.txt /*VimResized* +VimResume autocmd.txt /*VimResume* +VimSuspend autocmd.txt /*VimSuspend* Vimball-copyright pi_vimball.txt /*Vimball-copyright* Virtual-Replace-mode insert.txt /*Virtual-Replace-mode* VisVim if_ole.txt /*VisVim* @@ -10055,7 +10058,6 @@ vim-variable eval.txt /*vim-variable* vim.vim syntax.txt /*vim.vim* vim7 version7.txt /*vim7* vim8 version8.txt /*vim8* -vim9 vim9.txt /*vim9* vim9-classes vim9.txt /*vim9-classes* vim9-const vim9.txt /*vim9-const* vim9-declaration vim9.txt /*vim9-declaration* diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -1,4 +1,4 @@ -*tagsrch.txt* For Vim version 8.2. Last change: 2020 Apr 19 +*tagsrch.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -556,7 +556,7 @@ The first format is a normal tag, which is the only format produced by traditional ctags implementations. This is often used for functions that are global, also referenced in other files. -The lines in the tags file can end in or . On the Macintosh +The lines in the tags file can end in or . On the Macintosh also works. The and characters can never appear inside a line. The second format is new. It includes additional information in optional diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt --- a/runtime/doc/testing.txt +++ b/runtime/doc/testing.txt @@ -1,4 +1,4 @@ -*testing.txt* For Vim version 8.2. Last change: 2020 Sep 06 +*testing.txt* For Vim version 8.2. Last change: 2020 Dec 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -308,8 +308,11 @@ assert_fails({cmd} [, {error} [, {msg} [ first reported error: > assert_fails('cmd', ['E987:.*expected bool']) < The second pattern, if present, is matched against the last - reported error. To only match the last error use an empty - string for the first error: > + reported error. + If there is only one error then both patterns must match. This + can be used to check that there is only one error. + To only match the last error use an empty string for the first + error: > assert_fails('cmd', ['', 'E987:']) < If {msg} is empty then it is not used. Do this to get the 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: 2020 Dec 10 +*todo.txt* For Vim version 8.2. Last change: 2020 Dec 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,6 +38,11 @@ browser use: https://github.com/vim/vim/ *known-bugs* -------------------- Known bugs and current work ----------------------- +Rewrite the section on "magic". Say that 'magic' is normally on, then this +happens... If 'magic' is off, then this is different.. + +test_vim9_cmd: uses uninitialized var + Vim9 - Make everything work: - For an :autocmd and :command argument defined in Vim9 script, if a following line starts with "|" append it. It's like line continuation. (#6702) @@ -45,6 +50,7 @@ Vim9 - Make everything work: a range from "a" to "b"? To avoid confusion, require white space before (and after) the colon? #7409 - Implement "export {one, two three}". +- Use "null" for v:null, like true and false? #7495 - ISN_CHECKTYPE could use check_argtype() - Using a script variable inside a :def function doesn't work if the variable is inside a block, see Test_nested_function(). Should it work? @@ -62,6 +68,8 @@ Vim9 - Make everything work: map(list, SomeFunc) - For builtin functions using tv_get_string*() use check_for_string() to be more strict about the argument type. +- Allow function names that will be script-local to start with lower case + letter? - Support passing v:none to use the default argument value. (#6504) - Make map() give an error if the resulting type of the first argument is wrong. Only works if the type is known? Is this slow (need to go over all @@ -81,6 +89,7 @@ Vim9 - Make everything work: - Using ".." at script level doesn't convert arguments to a string. - Compile replacement of :s command: s/pat/\=expr/ - Compile redir to local variable: var_redir_start(). +- Implement type cast at the script level. - Compile builtin functions that access local variables: islocked() - When evaluating constants for script variables, some functions could work: @@ -127,6 +136,10 @@ Also: stack? - Make profiling work - Add ISN_PROFILE instructions after every line? - List commands when 'verbose' is set or :verbose is used. +Once Vim9 is stable: +- Change the help to prefer Vim9 syntax where appropriate +- Use Vim9 for runtime files. + PR #7497 for autoload/ccomplete.vim Further improvements: - compile options that are an expression, e.g. "expr:" in 'spellsuggest', 'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert', @@ -1273,9 +1286,6 @@ Once .exe with updated installer is avai about /S and /D options (Ken Takata, 2016 Apr 13) Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases -Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11, -#1053) With patch, does it work? - ":sbr" docs state it respects 'switchbuf', but "vsplit" does not cause a vertical split. (Haldean Brown, 2017 Mar 1) @@ -3998,8 +4008,6 @@ 9 Make the Reference Manual more preci - if it can be undone (u/CTRL-R) and redone (.) - how it works for folded lines - how it works with multibyte characters -9 In change.txt, remark about Javadoc isn't right. Right alignment would - work too. 8 Spread the windows commands over the other files. For example, ":stag" should be with ":tag". Cross-link with tags to avoid too much double text. diff --git a/runtime/doc/usr_23.txt b/runtime/doc/usr_23.txt --- a/runtime/doc/usr_23.txt +++ b/runtime/doc/usr_23.txt @@ -1,4 +1,4 @@ -*usr_23.txt* For Vim version 8.2. Last change: 2006 Apr 24 +*usr_23.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM USER MANUAL - by Bram Moolenaar @@ -28,9 +28,9 @@ start a new line. One to move the carri (carriage return, ), another to move the paper up (line feed, ). When computers came out, storage was expensive. Some people decided that they did not need two characters for end-of-line. The UNIX people decided -they could use only for end-of-line. The Apple people -standardized on . The Microsoft Windows folks decided to keep -the old . +they could use or only for end-of-line. The Apple people +standardized on . The Microsoft Windows folks decided to keep the old + (we use for line feed in the help text). This means that if you try to move a file from one system to another, you have line-break problems. The Vim editor automatically recognizes the different file formats and handles things properly behind your back. @@ -55,20 +55,20 @@ which format you have, execute the follo The three names that Vim uses are: - unix - dos + unix + dos mac USING THE MAC FORMAT -On Unix, is used to break a line. It's not unusual to have a +On Unix, is used to break a line. It's not unusual to have a character halfway a line. Incidentally, this happens quite often in Vi (and Vim) scripts. On the Macintosh, where is the line break character, it's possible to -have a character halfway a line. +have a character halfway a line. The result is that it's not possible to be 100% sure whether a file -containing both and characters is a Mac or a Unix file. Therefore, +containing both and characters is a Mac or a Unix file. Therefore, Vim assumes that on Unix you probably won't edit a Mac file, and doesn't check for this type of file. To check for this format anyway, add "mac" to 'fileformats': > diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 8.2. Last change: 2020 Nov 09 +*usr_41.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM USER MANUAL - by Bram Moolenaar @@ -1765,7 +1765,7 @@ Here is a summary of items that apply to elsewhere, but form a nice checklist. The end-of-line character depends on the system. For Unix a single -character is used. For MS-Windows and the like, is used. This is +character is used. For MS-Windows and the like, is used. This is important when using mappings that end in a . See |:source_crnl|. diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt --- a/runtime/doc/version5.txt +++ b/runtime/doc/version5.txt @@ -1,4 +1,4 @@ -*version5.txt* For Vim version 8.2. Last change: 2020 Sep 02 +*version5.txt* For Vim version 8.2. Last change: 2020 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -805,7 +805,7 @@ Using "~" for $HOME now works for all sy Unix: Besides using CTRL-C, also use the INTR character from the tty settings. Somebody has INTR set to DEL. -Allow a in a ":help" command argument to end the help command, so another +Allow a in a ":help" command argument to end the help command, so another command can follow. Doing "%" on a line that starts with " #if" didn't jump to matching "#else". diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 8.2. Last change: 2020 Dec 05 +*vim9.txt* For Vim version 8.2. Last change: 2020 Dec 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -6,7 +6,7 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE -Vim9 script commands and expressions. *vim9* +Vim9 script commands and expressions. *Vim9* Most expression help is in |eval.txt|. This file is about the new syntax and features in Vim9 script. @@ -134,7 +134,7 @@ Compilation is done when either of these `:def` has no options like `:function` does: "range", "abort", "dict" or "closure". A `:def` function always aborts on an error (unless `:silent!` was used for the command or inside a `:try` block), does not get a range passed -and cannot be a "dict" function. +cannot be a "dict" function, and can always be a closure. The argument types and return type need to be specified. The "any" type can be used, type checking will then be done at runtime, like with legacy @@ -187,6 +187,11 @@ Global functions can still be defined an Vim9 script script-local functions are defined once when the script is sourced and cannot be deleted or replaced. +When compiling a function and a function call is encountered for a function +that is not (yet) defined, the |FuncUndefined| autocommand is not triggered. +You can use an autoload function if needed, or call a legacy function and have +|FuncUndefined| triggered there. + Variable declarations with :var, :final and :const ~ *vim9-declaration* *:var* @@ -399,6 +404,16 @@ arguments: > separator = '-' ): string +Since a continuation line cannot be easily recognized the parsing of commands +has been made sticter. E.g., because of the error in the first line, the +second line is seen as a separate command: > + popup_create(some invalid expression, { + exit_cb: Func}) +Now "exit_cb: Func})" is actually a valid command: save any changes to the +file "_cb: Func})" and exit. To avoid this kind of mistake in Vim9 script +there must be white space between most command names and the argument. + + Notes: - "enddef" cannot be used at the start of a continuation line, it ends the current function. @@ -626,6 +641,13 @@ command. This will give an error for mi if has('feature') | use-feature | endif enddef +Other differences ~ + +Patterns are used like 'magic' is set, unless explicitly overruled. +The 'edcompatible' option value is not used. +The 'gdefault' option value is not used. + + ============================================================================== 3. New style functions *fast-functions* @@ -795,12 +817,14 @@ compiled code the "any" type is assumed. This can be a problem when the "any" type is undesired and the actual type is expected to always be the same. For example, when declaring a list: > var l: list = [1, g:two] -This will give an error, because "g:two" has type "any". To avoid this, use a -type cast: > +At compile time Vim doesn't know the type of "g:two" and the expression type +becomes list. An instruction is generated to check the list type before +doing the assignment, which is a bit inefficient. + *type-casting* +To avoid this, use a type cast: > var l: list = [1, g:two] -< *type-casting* -The compiled code will then check that "g:two" is a number at runtime and give -an error if it isn't. This is called type casting. +The compiled code will then only check that "g:two" is a number and give an +error if it isn't. This is called type casting. The syntax of a type cast is: "<" {type} ">". There cannot be white space after the "<" or before the ">" (to avoid them being confused with diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 8.2. Last change: 2020 Nov 07 +*windows.txt* For Vim version 8.2. Last change: 2020 Dec 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -205,11 +205,6 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N* This behaves like a ":split" first, and then an ":enew" command. -:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew* - Like |:new|, but split vertically. If 'equalalways' is set - and 'eadirection' isn't "ver" the windows will be spread out - horizontally, unless a width was specified. - :[N]new [++opt] [+cmd] {file} :[N]sp[lit] [++opt] [+cmd] {file} *:split_f* Create a new window and start editing file {file} in it. This @@ -221,6 +216,11 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N* height). Reduces the current window height to create room (and others, if the 'equalalways' option is set). +:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew* + Like |:new|, but split vertically. If 'equalalways' is set + and 'eadirection' isn't "ver" the windows will be spread out + horizontally, unless a width was specified. + :[N]sv[iew] [++opt] [+cmd] [file] *:sv* *:sview* *splitview* Same as ":split", but set 'readonly' option for this buffer. diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim --- a/runtime/ftplugin/css.vim +++ b/runtime/ftplugin/css.vim @@ -2,7 +2,7 @@ " Language: CSS " Maintainer: Doug Kearns " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Last Change: 2020 Dec 21 if exists("b:did_ftplugin") finish @@ -12,11 +12,12 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim -let b:undo_ftplugin = "setl com< cms< inc< fo< ofu<" +let b:undo_ftplugin = "setl com< cms< inc< fo< ofu< isk<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& setlocal formatoptions-=t formatoptions+=croql setlocal omnifunc=csscomplete#CompleteCSS +setlocal iskeyword+=- let &l:include = '^\s*@import\s\+\%(url(\)\=' diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim --- a/runtime/ftplugin/spec.vim +++ b/runtime/ftplugin/spec.vim @@ -73,23 +73,23 @@ if !exists("*s:SpecChangelog") let chgline = -1 while (line <= line("$")) let linestr = getline(line) - if (name == "" && linestr =~? '^Name:') + if name == "" && linestr =~? '^Name:' let nameline = line let name = substitute(strpart(linestr,5), '^[ ]*\([^ ]\+\)[ ]*$','\1','') - elseif (ver == "" && linestr =~? '^Version:') + elseif ver == "" && linestr =~? '^Version:' let verline = line let ver = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') - elseif (rel == "" && linestr =~? '^Release:') + elseif rel == "" && linestr =~? '^Release:' let relline = line let rel = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') - elseif (linestr =~? '^%changelog') + elseif linestr =~? '^%changelog' let chgline = line execute line break endif let line = line+1 endwhile - if (nameline != -1 && verline != -1 && relline != -1) + if nameline != -1 && verline != -1 && relline != -1 let include_release_info = exists("g:spec_chglog_release_info") let name = s:ParseRpmVars(name, nameline) let ver = s:ParseRpmVars(ver, verline) @@ -100,20 +100,20 @@ if !exists("*s:SpecChangelog") call s:GetRelVer() - if (chgline == -1) + if chgline == -1 let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3) - if (option == 1) + if option == 1 call append(line("$"),"") call append(line("$"),"%changelog") execute line("$") let chgline = line(".") - elseif (option == 2) + elseif option == 2 call append(line("."),"%changelog") normal j - chgline = line(".") + let chgline = line(".") endif endif - if (chgline != -1) + if chgline != -1 let tmptime = v:lc_time language time C let parsed_format = "* ".strftime(format)." - ".ver."-".rel @@ -122,16 +122,16 @@ if !exists("*s:SpecChangelog") let wrong_format = 0 let wrong_release = 0 let insert_line = 0 - if (getline(chgline+1) != parsed_format) + if getline(chgline+1) != parsed_format let wrong_format = 1 endif - if (include_release_info && getline(chgline+2) != release_info) + if include_release_info && getline(chgline+2) != release_info let wrong_release = 1 endif - if (wrong_format || wrong_release) - if (include_release_info && !wrong_release && !exists("g:spec_chglog_never_increase_release")) + if wrong_format || wrong_release + if include_release_info && !wrong_release && !exists("g:spec_chglog_never_increase_release") let option = confirm("Increase release? ","&Yes\n&No",1) - if (option == 1) + if option == 1 execute relline normal  let rel = substitute(strpart(getline(relline),8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') @@ -171,13 +171,13 @@ if !exists("*s:ParseRpmVars") let ret = "" while (1) let start = match(a:str, "\%{", end+1) - if (start == -1) + if start == -1 let ret = ret . strpart(a:str, end+1) break endif let ret = ret . strpart(a:str, end+1, start-(end+1)) let end = match(a:str, "}", start) - if (end == -1) + if end == -1 let ret = ret . strpart(a:str, start) break endif @@ -185,7 +185,7 @@ if !exists("*s:ParseRpmVars") execute a:strline let definestr = "^[ \t]*%\\(define\\|global\\)[ \t]\\+".varname."[ \t]\\+\\(.*\\)$" let linenum = search(definestr, "bW") - if (linenum != 0) + if linenum != 0 let ret = ret . substitute(getline(linenum), definestr, "\\2", "") endif endwhile diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -1,7 +1,7 @@ " Vim indent script for HTML " Maintainer: Bram Moolenaar " Original Author: Andy Wokula -" Last Change: 2020 Jul 06 +" Last Change: 2020 Dec 11 " Version: 1.0 "{{{ " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -815,7 +815,7 @@ func! s:Alien5() let idx = match(prevtext, '^\s*\zs