mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
Update runtime files
This commit is contained in:
@ -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
|
||||
|
4
runtime/autoload/dist/ft.vim
vendored
4
runtime/autoload/dist/ft.vim
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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()*
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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()*
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
@ -1,7 +1,9 @@
|
||||
" Vim indent file
|
||||
" Vim reST indent file
|
||||
" Language: reStructuredText Documentation Format
|
||||
" Maintainer: Marshall Ward <marshall.ward@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-08-03
|
||||
" 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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user