]> granicus.if.org Git - vim/commitdiff
Update runtime files
authorBram Moolenaar <Bram@vim.org>
Fri, 10 Apr 2020 20:10:56 +0000 (22:10 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 10 Apr 2020 20:10:56 +0000 (22:10 +0200)
24 files changed:
runtime/autoload/ccomplete.vim
runtime/autoload/dist/ft.vim
runtime/doc/change.txt
runtime/doc/eval.txt
runtime/doc/gui_w32.txt
runtime/doc/help.txt
runtime/doc/insert.txt
runtime/doc/options.txt
runtime/doc/os_beos.txt
runtime/doc/os_haiku.txt
runtime/doc/tags
runtime/doc/tagsrch.txt
runtime/doc/terminal.txt
runtime/doc/testing.txt
runtime/doc/todo.txt
runtime/doc/usr_22.txt
runtime/doc/vim9.txt
runtime/ftplugin/man.vim
runtime/ftplugin/rst.vim
runtime/indent/rst.vim
runtime/syntax/rst.vim
runtime/syntax/vhdl.vim
runtime/tutor/tutor
runtime/tutor/tutor.utf-8

index 156b3af0252d0c9ec5d6d7e93e8e865e7b0862b9..971e7367ce54b57997f1f9e7ed2dac95b56c7ee8 100644 (file)
@@ -1,7 +1,7 @@
 " Vim completion script
 " Language:    C
 " Maintainer:  Bram Moolenaar <Bram@vim.org>
-" Last Change: 2018 Aug 20
+" Last Change: 2020 Apr 08
 
 let s:cpo_save = &cpo
 set cpo&vim
@@ -635,3 +635,5 @@ endfunc
 
 let &cpo = s:cpo_save
 unlet s:cpo_save
+
+" vim: noet sw=2 sts=2
index 5c43ba280cc1e87f200b468001acafe7d97ee664..844a5ad73b3f97719385d12ae17b9d027b4dfb35 100644 (file)
@@ -1,7 +1,7 @@
 " Vim functions for file type detection
 "
 " Maintainer:  Bram Moolenaar <Bram@vim.org>
-" Last Change: 2020 Jan 02
+" Last Change: 2020 Mar 30
 
 " These functions are moved here from runtime/filetype.vim to make startup
 " faster.
@@ -325,7 +325,7 @@ endfunc
 
 func dist#ft#FTmm()
   let n = 1
-  while n < 10
+  while n < 20
     let line = getline(n)
     if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
       setf objcpp
index 9e482c82cef8326b4b3792dd464adbfee449ee6e..9c52e8d012d825d8458bf2d193818b1e1275c002 100644 (file)
@@ -1458,7 +1458,7 @@ text.  Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
   func! format#Format()
     " only reformat on explicit gq command
     if mode() != 'n'
-      " fall back to Vims internal reformatting
+      " fall back to Vim's internal reformatting
       return 1
     endif
     let lines = getline(v:lnum, v:lnum + v:count - 1)
index 981a358348491125744bc8d0e9a975f100062f74..7dbd992bd30a7e8aefede1797feb948a1376c4aa 100644 (file)
@@ -1,4 +1,4 @@
-*eval.txt*     For Vim version 8.2.  Last change: 2020 Mar 26
+*eval.txt*     For Vim version 8.2.  Last change: 2020 Apr 08
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -5137,10 +5137,11 @@ getcompletion({pat}, {type} [, {filtered}])             *getcompletion()*
 <
                                                        *getcurpos()*
 getcurpos()    Get the position of the cursor.  This is like getpos('.'), but
-               includes an extra item in the list:
-                   [bufnum, lnum, col, off, curswant] ~
+               includes an extra "curswant" item in the list:
+                   [0, lnum, col, off, curswant] ~
                The "curswant" number is the preferred column when moving the
                cursor vertically.  Also see |getpos()|.
+               The first "bufnum" item is always zero.
 
                This can be used to save and restore the cursor position: >
                        let save_cursor = getcurpos()
@@ -8917,18 +8918,10 @@ settagstack({nr}, {dict} [, {action}])                  *settagstack()*
 
                Returns zero for success, -1 for failure.
 
-               Examples:
-                   Set current index of the tag stack to 4: >
-                       call settagstack(1005, {'curidx' : 4})
-
-<                  Empty the tag stack of window 3: >
+               Examples (for more examples see |tagstack-examples||):
+                   Empty the tag stack of window 3: >
                        call settagstack(3, {'items' : []})
 
-<                  Push a new item onto the tag stack: >
-                       let pos = [bufnr('myfile.txt'), 10, 1, 0]
-                       let newtag = [{'tagname' : 'mytag', 'from' : pos}]
-                       call settagstack(2, {'items' : newtag}, 'a')
-
 <                  Save and restore the tag stack: >
                        let stack = gettagstack(1003)
                        " do something else
@@ -10876,6 +10869,7 @@ hpux                    HP-UX version of Vim.
 iconv                  Can use iconv() for conversion.
 insert_expand          Compiled with support for CTRL-X expansion commands in
                        Insert mode. (always true)
+job                    Compiled with support for |channel| and |job|
 jumplist               Compiled with |jumplist| support.
 keymap                 Compiled with 'keymap' support.
 lambda                 Compiled with |lambda| support.
@@ -11240,8 +11234,8 @@ It is allowed to define another function inside a function body.
 You can provide default values for positional named arguments.  This makes
 them optional for function calls.  When a positional argument is not
 specified at a call, the default expression is used to initialize it.
-This only works for functions declared with `:function`, not for lambda
-expressions |expr-lambda|.
+This only works for functions declared with `:function` or `:def`, not for
+lambda expressions |expr-lambda|.
 
 Example: >
   function Something(key, value = 10)
@@ -11279,9 +11273,10 @@ Example that does NOT work: >
   :function NoGood(first = a:second, second = 10)
   :endfunction
 <
-When not using "...", the number of arguments in a function call must be equal
-to the number of mandatory named arguments.  When using "...", the number of
-arguments may be larger.
+When not using "...", the number of arguments in a function call must be at
+least equal to the number of mandatory named arguments.  When using "...", the
+number of arguments may be larger than the total of mandatory and optional
+arguments.
 
                                                        *local-variables*
 Inside a function local variables can be used.  These will disappear when the
@@ -11638,7 +11633,7 @@ This does NOT work: >
                        Like above, but append/add/subtract the value for each
                        |List| item.
 
-:let [{name}, ..., ; {lastname}] = {expr1}
+:let [{name}, ..., ; {lastname}] = {expr1}                             *E452*
                        Like |:let-unpack| above, but the |List| may have more
                        items than there are names.  A list of the remaining
                        items is assigned to {lastname}.  If there are no
index fda361833621d6ccce496aec9a24a86feb4eb955..30e2287826a06e7a4898879d3b054fada95d5382 100644 (file)
@@ -199,7 +199,7 @@ With..." menu.  This means you can use Vim to edit many files.  Not every file
 One reason to add this is to be able to edit HTML files directly from Internet
 Explorer.  To enable this use the "Tools" menu, "Internet Options..." entry.
 In the dialog select the "Programs" tab and select Vim in the "HTML editor"
-choice.  If it's not there than installing didn't work properly.
+choice.  If it's not there then installing didn't work properly.
 
 Doing this manually can be done with this script:
 
index f2b78466eee543ce777c505b97c00db251da7349..d858be1db0d45db0d8e87bd473a98738b1114a86 100644 (file)
@@ -1,4 +1,4 @@
-*help.txt*     For Vim version 8.2.  Last change: 2019 Jul 21
+*help.txt*     For Vim version 8.2.  Last change: 2020 Apr 05
 
                        VIM - main help file
                                                                         k
@@ -31,7 +31,7 @@ Get specific help:  It is possible to go directly to whatever you want help
                    help entries for "word".
                    Or use ":helpgrep word". |:helpgrep|
 
-  Getting started:  Do the Vim tutor, a 20 minute interactive training for the
+  Getting started:  Do the Vim tutor, a 30-minute interactive course for the
                    basic commands, see |vimtutor|.
                    Read the user manual from start to end: |usr_01.txt|
 
@@ -41,7 +41,7 @@ through the help of many others.  See |credits|.
                                                *doc-file-list* *Q_ct*
 BASIC:
 |quickref|     Overview of the most common commands you will use
-|tutor|                20 minutes training course for beginners
+|tutor|                30-minute interactive course for beginners
 |copying|      About copyrights
 |iccf|         Helping poor children in Uganda
 |sponsor|      Sponsor Vim development, become a registered Vim user
@@ -144,7 +144,7 @@ Special issues ~
 |remote.txt|   using Vim as a server or client
 |term.txt|     using different terminals and mice
 |terminal.txt| Terminal window support
-|popup.txt|    popop window support
+|popup.txt|    popup window support
 
 Programming language support ~
 |indent.txt|   automatic indenting for C and other languages
index 934c1c57a99554e3865ad2c712b710d7cb179460..99c2d40e7dae1938323d1ea02fe62ea96baa64a5 100644 (file)
@@ -154,6 +154,8 @@ CTRL-R CTRL-R {register}                    *i_CTRL-R_CTRL-R*
                you also want to avoid these, use CTRL-R CTRL-O, see below.
                The '.' register (last inserted text) is still inserted as
                typed.
+               After this command, the '.' register contains the text from
+               the register as if it was inserted by typing it.
 
 CTRL-R CTRL-O {register}                       *i_CTRL-R_CTRL-O*
                Insert the contents of a register literally and don't
@@ -163,6 +165,9 @@ CTRL-R CTRL-O {register}                    *i_CTRL-R_CTRL-O*
                Does not replace characters!
                The '.' register (last inserted text) is still inserted as
                typed.
+               After this command, the '.' register contains the command
+               typed and not the text. I.e., the literals "^R^O" and not the
+               text from the register.
 
 CTRL-R CTRL-P {register}                       *i_CTRL-R_CTRL-P*
                Insert the contents of a register literally and fix the
@@ -170,6 +175,9 @@ CTRL-R CTRL-P {register}                    *i_CTRL-R_CTRL-P*
                Does not replace characters!
                The '.' register (last inserted text) is still inserted as
                typed.
+               After this command, the '.' register contains the command
+               typed and not the text. I.e., the literals "^R^P" and not the
+               text from the register.
 
                                                *i_CTRL-T*
 CTRL-T         Insert one shiftwidth of indent at the start of the current
index b17be8646cab815ea87ce953b27f4f9d3d2c17eb..9410726d08fb71424591a84cf00c253ef39fff6e 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 8.2.  Last change: 2020 Mar 02
+*options.txt*  For Vim version 8.2.  Last change: 2020 Apr 10
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -7957,7 +7957,7 @@ A jump table for the options with a short description can be found at |Q_op|.
                - VIM           the server name |v:servername| or "VIM"
        Only works if the terminal supports setting window titles
        (currently Amiga console, Win32 console, all GUI versions and
-       terminals with a non- empty 't_ts' option - these are Unix xterm and
+       terminals with a non-empty 't_ts' option - these are Unix xterm and
        iris-ansi by default, where 't_ts' is taken from the builtin termcap).
                                                                *X11*
        When Vim was compiled with HAVE_X11 defined, the original title will
index ba0e07f8d444e244bf32dd3d0bd4b874dc4a1681..916162fa4be255293dd9439c67fcd7ec247b2bb7 100644 (file)
@@ -138,7 +138,7 @@ and merge it back in.
 
 6. The $VIM directory                                  *beos-vimdir*
 
-$VIM is the symbolic name for the place where Vims support files are stored.
+$VIM is the symbolic name for the place where Vim's support files are stored.
 The default value for $VIM is set at compile time and can be determined with >
 
   :version
index aabfe1c85b69b6715614a17767b4ff6411fd3a6b..2c02994d50cf465ca08740d6a64f47791a1070ec 100644 (file)
@@ -88,7 +88,7 @@ Stuff that does not work yet:
 
 4. The $VIM directory                                  *haiku-vimdir*
 
-$VIM is the symbolic name for the place where Vims support files are stored.
+$VIM is the symbolic name for the place where Vim's support files are stored.
 The default value for $VIM is set at compile time and can be determined with >
 
   :version
index 379af501d31ff4e37744efb43e08e8f177093bb1..68ac1a9ed14167ab1bce229a4610addab2c53398 100644 (file)
@@ -4244,6 +4244,7 @@ E447      editing.txt     /*E447*
 E448   various.txt     /*E448*
 E449   eval.txt        /*E449*
 E45    message.txt     /*E45*
+E452   eval.txt        /*E452*
 E455   print.txt       /*E455*
 E456   print.txt       /*E456*
 E457   print.txt       /*E457*
@@ -9348,6 +9349,7 @@ tags-file-format  tagsrch.txt     /*tags-file-format*
 tags-option    tagsrch.txt     /*tags-option*
 tagsrch.txt    tagsrch.txt     /*tagsrch.txt*
 tagstack       tagsrch.txt     /*tagstack*
+tagstack-examples      tagsrch.txt     /*tagstack-examples*
 tan()  eval.txt        /*tan()*
 tanh() eval.txt        /*tanh()*
 tar    pi_tar.txt      /*tar*
@@ -9503,6 +9505,7 @@ test_ignore_error()       testing.txt     /*test_ignore_error()*
 test_null_blob()       testing.txt     /*test_null_blob()*
 test_null_channel()    testing.txt     /*test_null_channel()*
 test_null_dict()       testing.txt     /*test_null_dict()*
+test_null_function()   testing.txt     /*test_null_function()*
 test_null_job()        testing.txt     /*test_null_job()*
 test_null_list()       testing.txt     /*test_null_list()*
 test_null_partial()    testing.txt     /*test_null_partial()*
index ed406e8dc3cce4b344d3dedca1df45417d25959f..0b22deba13a838b364dee21797748135546901fc 100644 (file)
@@ -1,4 +1,4 @@
-*tagsrch.txt*   For Vim version 8.2.  Last change: 2020 Jan 30
+*tagsrch.txt*   For Vim version 8.2.  Last change: 2020 Apr 03
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -185,6 +185,29 @@ commands explained above the tag stack will look like this:
 The |gettagstack()| function returns the tag stack of a specified window. The
 |settagstack()| function modifies the tag stack of a window.
 
+                                                       *tagstack-examples*
+Write to the tag stack just like `:tag` but with a user-defined
+jumper#jump_to_tag function: >
+       " Store where we're jumping from before we jump.
+       let tag = expand('<cword>')
+       let pos = [bufnr()] + getcurpos()[1:]
+       let item = {'bufnr': pos[0], 'from': pos, 'tagname': tag}
+       if jumper#jump_to_tag(tag)
+               " Jump was successful, write previous location to tag stack.
+               let winid = win_getid()
+               let stack = gettagstack(winid)
+               let stack['items'] = [item]
+               call settagstack(winid, stack, 't')
+       endif
+<
+Set current index of the tag stack to 4: >
+       call settagstack(1005, {'curidx' : 4})
+<
+Push a new item onto the tag stack: >
+       let pos = [bufnr('myfile.txt'), 10, 1, 0]
+       let newtag = [{'tagname' : 'mytag', 'from' : pos}]
+       call settagstack(2, {'items' : newtag}, 'a')
+<
                                                        *E73*
 When you try to use the tag stack while it doesn't contain anything you will
 get an error message.
index ac9d65841218fbe1017e8b104d62f1ed2c8af2b2..8105b072f4867f2e6a718315a5ba41556e321a02 100644 (file)
@@ -960,7 +960,7 @@ Currently supported commands:
                directory, thus it's best to use the full path.
 
                [options] is only used when opening a new window.  If present,
-               it must be a Dict.  Similarly to |++opt|, These entries are
+               it must be a Dict.  Similarly to |++opt|, these entries are
                recognized:
                  "ff"          file format: "dos", "mac" or "unix"
                  "fileformat"  idem
index 458aa7cbb01a5649ded0d357922bc058d4348469..9c87cba642e8eca9d276433b00d4fce453c86cce 100644 (file)
@@ -1,4 +1,4 @@
-*testing.txt*  For Vim version 8.2.  Last change: 2020 Feb 22
+*testing.txt*  For Vim version 8.2.  Last change: 2020 Apr 10
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -107,7 +107,7 @@ test_null_dict()                                    *test_null_dict()*
 
 
 test_null_function()                                   *test_null_function()*
-               Return a |FuncRef| that is null. Only useful for testing.
+               Return a |Funcref| that is null. Only useful for testing.
 
 
 test_null_job()                                                *test_null_job()*
index afa40227b7da2c43bb070483172ea2f91ae688db..c7269216ed7278145d1fe4090637c5ecd9cc1580 100644 (file)
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 8.2.  Last change: 2020 Mar 27
+*todo.txt*      For Vim version 8.2.  Last change: 2020 Apr 10
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -39,9 +39,19 @@ browser use: https://github.com/vim/vim/issues/1234
 -------------------- Known bugs and current work -----------------------
 
 Vim9 script:
+func and partial types:
+- check using func type with default arguments and varargs.
+       func(type, type?, ...): rettype
+- Type checking arguments when calling :def function and test
+- Calling unknown user function does not give proper error message:
+      assert_equal('123text', RefDef2Arg())  typo for "RetDef2Arg"
 - "func" inside "vim9script" doesn't work?  (Ben Jackson, #5670)
-- "let x = x + 1" should say that "x" is not defined (declare local after
-  evaluating expresion).
+- :func inside vim9script must still use a:arg
+- define function and create funcref in one step:
+       let ref = def(arg: type): rettype
+           body
+       enddef
+Also:
 - "echo Func()" is an error if Func() does not return anything.
 - better implementation for partial and tests for that.
 - Make "g:imported = Export.exported" work in Vim9 script.
@@ -50,7 +60,6 @@ Vim9 script:
 - Disallow unlet for local/script/imported vars
 - Support type for ":let"/":const" at script level for Vim9 script.
     (Ben Jackson, #5671)
-- :func inside vim9script must still use a:arg
 - Make "++nr" work.
 - Check that import in legacy script works and puts item in s:
 - Error in any command in "vim9script" aborts sourcing.
@@ -60,23 +69,19 @@ Vim9 script:
 - Test try/catch and throw better, also nested.
   Test return inside try/finally jumps to finally and then returns.
 - call autoload function.
-- Type checking arguments when calling :def function
 - Implement more expressions, e.g. [a:b]
 - can use func as reference:
        def SomeFunc() ...
        map(list, SomeFunc)
-- define function and create funcref in one step:
-       let ref = def(arg: type): rettype
-  Also extends lambda
 - Test: Function declared inside a :def function is local, disappears at the
   end of the function.  Unless g: is used, just like with variables.
 - Can we omit \ for line continuation inside (), {}, ?
   Requires parsing while reading a function.  Like fgetline in do_one_cmd()?
 - implement :type
+- import type declaration?
 - implement class
 - implement interface
 - predefined class: Promise<T>
-- import statement for type declaration?
 - Make accessing varargs faster: arg[expr]
        EVAL expr
        LOADVARARG (varags idx)
@@ -106,6 +111,8 @@ Popup windows:
 - Figure out the size and position better if wrapping inserts indent
 
 Text properties:
+- Patch to fix that split / join does not update properties properly (Axel
+  Forsman, #5839)  Alternative: #5875.
 - "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
 - Get E685 with a sequence of commands. (#5674)
 - Combining text property with 'cursorline' does not always work (Billie
@@ -176,17 +183,22 @@ Terminal emulator window:
   conversions.
 
 Error numbers available:
-E451, E452, E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
+E453, E454, E460, E489, E491, E565, E578, E610, E611, E653,
 E654, E856, E857, E861, E900
 
+Buffer autocommands are a bit inconsistent.  Add a separate set of
+autocommands for the buffer lifecycle:
+    BufIsCreated  (after buffer ID exists)
+    BufIsLoaded   (after buffer ID has content)
+    BufIsUnloaded (after buffer ID no longer has)
+    BufIsWiped    (after buffer ID was wiped)
+    BufIsRenamed  (after buffer ID gets another name)
+The buffer list and windows are locked, no changes possible
+
 Patch to fix drawing error with DirectX. (James Grant, #5688)
 Causes flicker on resizing.
 
-Patch to make lambda functions faster (Ken Takata)
-https://github.com/vim/vim/pull/5727
- LGTM remark: size derived from user input (getenv).  Don't see how.
-
-Patch to use more FOR_ALL_ macros and use them. (Yegappan Lakshmanan, #5339)
+In gvim always set t_Co to 16777216 (#5903)
 
 Patch to explain use of "%" in :!.  (David Briscoe, #5591)
 
index 00c0007de2204394b2a0b943a0367130ba8003b2..bdba90614b88eab22ef61b8c51aff25f3c04afab 100644 (file)
@@ -1,4 +1,4 @@
-*usr_22.txt*   For Vim version 8.2.  Last change: 2019 Dec 07
+*usr_22.txt*   For Vim version 8.2.  Last change: 2020 Mar 28
 
                     VIM USER MANUAL - by Bram Moolenaar
 
@@ -84,7 +84,7 @@ browser.  This is what you get: >
         a................Hiding Files or Directories................|netrw-a|
         mb...............Bookmarking a Directory....................|netrw-mb|
         gb...............Changing to a Bookmarked Directory.........|netrw-gb|
-        c................Make Browsing Directory The Current Dir....|netrw-c|
+        cd...............Make Browsing Directory The Current Dir....|netrw-c|
         d................Make A New Directory.......................|netrw-d|
         D................Deleting Files or Directories..............|netrw-D|
         <c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
@@ -121,7 +121,7 @@ The following normal-mode commands may be used to control the browser display:
 
 As a sampling of extra normal-mode commands:
 
-       c               Change Vim's notion of the current directory to be
+       cd              Change Vim's notion of the current directory to be
                        the same as the browser directory.  (see
                        |g:netrw_keepdir| to control this, too)
        R               Rename the file or directory under the cursor; a
index 1c180708aef60fc1b48d6bfc3d04784ca8663078..1337d4a6d36e971d3564cbd153b5fcf910c71361 100644 (file)
@@ -1,4 +1,4 @@
-*vim9.txt*     For Vim version 8.2.  Last change: 2020 Apr 03
+*vim9.txt*     For Vim version 8.2.  Last change: 2020 Apr 09
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -120,6 +120,13 @@ and without `:let`, because there is no rule about where they are declared.
 Variables cannot shadow previously defined variables.
 Variables may shadow Ex commands, rename the variable if needed.
 
+Global variables must be prefixed with "g:", also at the script level.
+However, global user defined functions are used without "g:". >
+       vim9script
+       let script_local = 'text'
+       let g:global = 'value'
+       let Funcref = ThatFunction
+
 Since "&opt = value" is now assigning a value to option "opt", ":&" cannot be
 used to repeat a `:substitute` command.
 
@@ -156,6 +163,18 @@ since the function has to be looked up by name.  And a typo in the function
 name will only be found when the call is executed.
 
 
+Omitting function() ~
+
+A user defined function can be used as a function reference in an expression
+without `function()`. The argument types and return type will then be checked.
+The function must already have been defined. >
+
+       let Funcref = MyFunction
+
+When using `function()` the resulting type is "func", a function with any
+number of arguments and any return type.  The function can be defined later.
+
+
 No curly braces expansion ~
 
 |curly-braces-names| cannot be used.
@@ -213,8 +232,7 @@ few exceptions.
        blob            non-empty
        list            non-empty (different from JavaScript)
        dictionary      non-empty (different from JavaScript)
-       func            when not NULL
-       partial         when not NULL
+       func            when there is a function name
        special         v:true
        job             when not NULL
        channel         when not NULL
@@ -301,6 +319,7 @@ The following builtin types are supported:
        job
        channel
        func
+       func: {type}
        func({type}, ...)
        func({type}, ...): {type}
 
@@ -318,12 +337,22 @@ memory.
 
 A partial and function can be declared in more or less specific ways:
 func                           any kind of function reference, no type
-                               checking
+                               checking for arguments or return value
 func: {type}                   any number and type of arguments with specific
                                return type
-func({type} ...)               function with argument types, does not return
+func({type})                   function with argument type, does not return
                                a value
-func({type} ...): {type}       function with argument types and return type
+func({type}): {type}           function with argument type and return type
+func(?{type})                  function with type of optional argument, does
+                               not return a value
+func(...{type})                        function with type of variable number of
+                               arguments, does not return a value
+func({type}, ?{type}, ...{type}): {type}
+                               function with:
+                               - type of mandatory argument
+                               - type of optional argument
+                               - type of variable number of arguments
+                               - return type
 
 If the return type is "void" the function does not return a value.
 
index d7ce4d8acb5347f701285ac663b026853724306b..44efd4eb65614c9f1d1f233dd3057bcb124b8059 100644 (file)
@@ -1,8 +1,7 @@
 " Vim filetype plugin file
 " Language:    man
 " Maintainer:  SungHyun Nam <goweol@gmail.com>
-" Last Change:         2020 Mar 25
-"              (fix by Jason Franklin)
+" Last Change:         2020 Apr 6
 
 " To make the ":Man" command available before editing a manual page, source
 " this script from your startup vimrc file.
@@ -205,6 +204,7 @@ func <SID>GetPage(cmdmods, ...)
     let s:env_has_u = (v:shell_error == 0)
   endif
   let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
+  let env_cmd .= ' GROFF_NO_SGR=1'
   let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
   silent exec "r !" . man_cmd
 
index f0646e9f366e748a11ccebff8d7ff76f1518eb3c..ff7a402d10092439f57cdb22dace392342248281 100644 (file)
@@ -3,7 +3,7 @@
 " Maintainer: Marshall Ward <marshall.ward@gmail.com>
 " Original Maintainer: Nikolai Weibull <now@bitwi.se>
 " Website: https://github.com/marshallward/vim-restructuredtext
-" Latest Revision: 2018-12-29
+" Latest Revision: 2020-03-31
 
 if exists("b:did_ftplugin")
     finish
@@ -34,7 +34,7 @@ if exists("g:rst_style") && g:rst_style != 0
     setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
 endif
 
-if has('patch-7.3.867')  " Introduced the TextChanged event.
+if g:rst_fold_enabled != 0 && has('patch-7.3.867')  " Introduced the TextChanged event.
   setlocal foldmethod=expr
   setlocal foldexpr=RstFold#GetRstFold()
   setlocal foldtext=RstFold#GetRstFoldText()
index c1ef8c995785de7d41f11ce00d8212f6f8532bd1..a31ad8e0809797908d0f188d5e773b12aba9713e 100644 (file)
@@ -1,7 +1,9 @@
 " Vim indent file
-" Language:             reStructuredText Documentation Format
-" Previous Maintainer:  Nikolai Weibull <now@bitwi.se>
-" Latest Revision:      2011-08-03
+" Vim reST indent file
+" Language: reStructuredText Documentation Format
+" Maintainer: Marshall Ward <marshall.ward@gmail.com>
+" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
+" Latest Revision: 2020-03-31
 
 if exists("b:did_indent")
   finish
@@ -18,6 +20,12 @@ endif
 
 let s:itemization_pattern = '^\s*[-*+]\s'
 let s:enumeration_pattern = '^\s*\%(\d\+\|#\)\.\s\+'
+let s:note_pattern = '^\.\. '
+
+function! s:get_paragraph_start()
+    let paragraph_mark_start = getpos("'{")[1]
+    return getline(paragraph_mark_start) =~ '\S' ? paragraph_mark_start : paragraph_mark_start + 1
+endfunction
 
 function GetRSTIndent()
   let lnum = prevnonblank(v:lnum - 1)
@@ -28,6 +36,13 @@ function GetRSTIndent()
   let ind = indent(lnum)
   let line = getline(lnum)
 
+  let psnum = s:get_paragraph_start()
+  if psnum != 0
+      if getline(psnum) =~ s:note_pattern
+          let ind = 3
+      endif
+  endif
+
   if line =~ s:itemization_pattern
     let ind += 2
   elseif line =~ s:enumeration_pattern
index c865cf6905503270b50cc942809867b110faecc1..a90c90be21a2dcc627f0a12f933fe703c4eae398 100644 (file)
@@ -1,9 +1,9 @@
-" Vim syntax file
+" Vim reST syntax file
 " Language: reStructuredText documentation format
 " Maintainer: Marshall Ward <marshall.ward@gmail.com>
 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
 " Website: https://github.com/marshallward/vim-restructuredtext
-" Latest Revision: 2018-12-29
+" Latest Revision: 2020-03-31
 
 if exists("b:current_syntax")
   finish
@@ -21,7 +21,7 @@ syn cluster rstCruft                contains=rstEmphasis,rstStrongEmphasis,
       \ rstInlineInternalTargets,rstFootnoteReference,rstHyperlinkReference
 
 syn region  rstLiteralBlock         matchgroup=rstDelimiter
-      \ start='::\_s*\n\ze\z(\s\+\)' skip='^$' end='^\z1\@!'
+      \ start='\(^\z(\s*\).*\)\@<=::\n\s*\n' skip='^\s*$' end='^\(\z1\s\+\)\@!'
       \ contains=@NoSpell
 
 syn region  rstQuotedLiteralBlock   matchgroup=rstDelimiter
@@ -90,16 +90,28 @@ execute 'syn match rstSubstitutionDefinition contained' .
       \ ' /|.*|\_s\+/ nextgroup=@rstDirectives'
 
 function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right)
+  " Only escape the first char of a multichar delimiter (e.g. \* inside **)
+  if a:start[0] == '\'
+    let first = a:start[0:1]
+  else
+    let first = a:start[0]
+  endif
+
+  execute 'syn match rstEscape'.a:name.' +\\\\\|\\'.first.'+'.' contained'
+
   execute 'syn region rst' . a:name .
         \ ' start=+' . a:char_left . '\zs' . a:start .
         \ '\ze[^[:space:]' . a:char_right . a:start[strlen(a:start) - 1] . ']+' .
         \ a:middle .
-        \ ' end=+\S' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+'
+        \ ' end=+' . a:end . '\ze\%($\|\s\|[''"’)\]}>/:.,;!?\\-]\)+' .
+        \ ' contains=rstEscape' . a:name
+
+  execute 'hi def link rstEscape'.a:name.' Special'
 endfunction
 
 function! s:DefineInlineMarkup(name, start, middle, end)
   let middle = a:middle != "" ?
-        \ (' skip=+\\\\\|\\' . a:middle . '+') :
+        \ (' skip=+\\\\\|\\' . a:middle . '\|\s' . a:middle . '+') :
         \ ""
 
   call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, "'", "'")
@@ -161,7 +173,7 @@ syn match   rstStandaloneHyperlink  contains=@NoSpell
       \ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
 
 syn region rstCodeBlock contained matchgroup=rstDirective
-      \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+.*\_s*\n\ze\z(\s\+\)+
+      \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s*\(\S*\)\?\s*\n\%(\s*:.*:\s*.*\s*\n\)*\n\ze\z(\s\+\)+
       \ skip=+^$+
       \ end=+^\z1\@!+
       \ contains=@NoSpell
index b40b096525c5393f885261be962d687f5ee9aefc..06fc2e795e90b1b3ca960088e3a019fdfc0d562a 100644 (file)
@@ -3,7 +3,7 @@
 " Maintainer:          Daniel Kho <daniel.kho@logik.haus>
 " Previous Maintainer: Czo <Olivier.Sirol@lip6.fr>
 " Credits:             Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
-" Last Changed:                2020 Mar 09 by Daniel Kho
+" Last Changed:                2020 Apr 04 by Daniel Kho
 
 " quit when a syntax file was already loaded
 if exists("b:current_syntax")
@@ -16,10 +16,10 @@ set cpo&vim
 " case is not significant
 syn case       ignore
 
-" VHDL keywords
-syn keyword    vhdlStatement   access after alias all assert
+" VHDL 1076-2019 keywords
+syn keyword    vhdlStatement   access after alias all
 syn keyword    vhdlStatement   architecture array attribute
-syn keyword    vhdlStatement   assume assume_guarantee
+syn keyword    vhdlStatement   assert assume
 syn keyword    vhdlStatement   begin block body buffer bus
 syn keyword    vhdlStatement   case component configuration constant
 syn keyword    vhdlStatement   context cover
@@ -34,20 +34,19 @@ syn keyword         vhdlStatement   map
 syn keyword    vhdlStatement   new next null
 syn keyword    vhdlStatement   of on open others out
 syn keyword    vhdlStatement   package port postponed procedure process pure
-syn keyword    vhdlStatement   parameter property protected
+syn keyword    vhdlStatement   parameter property protected private
 syn keyword    vhdlStatement   range record register reject report return
-syn keyword    vhdlStatement   release restrict restrict_guarantee
-syn keyword    vhdlStatement   select severity signal shared
-syn keyword    vhdlStatement   subtype
+syn keyword    vhdlStatement   release restrict
+syn keyword    vhdlStatement   select severity signal shared subtype
 syn keyword    vhdlStatement   sequence strong
 syn keyword    vhdlStatement   then to transport type
 syn keyword    vhdlStatement   unaffected units until use
-syn keyword    vhdlStatement   variable
-" VHDL-2019 interface
-syn keyword    vhdlStatement   view
-syn keyword    vhdlStatement   vmode vprop vunit
+syn keyword    vhdlStatement   variable view
+syn keyword    vhdlStatement   vpkg vmode vprop vunit
 syn keyword    vhdlStatement   wait when while with
-syn keyword    vhdlStatement   note warning error failure
+
+" VHDL predefined severity levels
+syn keyword    vhdlAttribute   note warning error failure
 
 " Linting of conditionals.
 syn match      vhdlStatement   "\<\(if\|else\)\>"
@@ -265,4 +264,5 @@ let b:current_syntax = "vhdl"
 
 let &cpo = s:cpo_save
 unlet s:cpo_save
+
 " vim: ts=8
index 426fb575697dcf338494f755eda85c7313a698f5..3add4f66dfdb662fe13fae6053474de1b9b7c82a 100644 (file)
@@ -7,7 +7,7 @@
      enough of the commands that you will be able to easily use Vim as
      an all-purpose editor.
 
-     The approximate time required to complete the tutor is 25-30 minutes,
+     The approximate time required to complete the tutor is 30 minutes,
      depending upon how much time is spent with experimentation.
 
      ATTENTION:
index 426fb575697dcf338494f755eda85c7313a698f5..3add4f66dfdb662fe13fae6053474de1b9b7c82a 100644 (file)
@@ -7,7 +7,7 @@
      enough of the commands that you will be able to easily use Vim as
      an all-purpose editor.
 
-     The approximate time required to complete the tutor is 25-30 minutes,
+     The approximate time required to complete the tutor is 30 minutes,
      depending upon how much time is spent with experimentation.
 
      ATTENTION: