mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
Update runtime files
This commit is contained in:
parent
a7eedf317a
commit
7ff78465f7
@ -1,15 +1,11 @@
|
||||
" Vim script to download a missing spell file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2012 Jan 08
|
||||
" Last Change: 2020 Jul 10
|
||||
|
||||
if !exists('g:spellfile_URL')
|
||||
" Prefer using http:// when netrw should be able to use it, since
|
||||
" more firewalls let this through.
|
||||
if executable("curl") || executable("wget") || executable("fetch")
|
||||
let g:spellfile_URL = 'http://ftp.vim.org/pub/vim/runtime/spell'
|
||||
else
|
||||
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
|
||||
endif
|
||||
" Always use https:// because it's secure. The certificate is for nluug.nl,
|
||||
" thus we can't use the alias ftp.vim.org here.
|
||||
let g:spellfile_URL = 'https://ftp.nluug.nl/pub/vim/runtime/spell'
|
||||
endif
|
||||
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.2. Last change: 2020 Jun 01
|
||||
*channel.txt* For Vim version 8.2. Last change: 2020 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1259,7 +1259,7 @@ can start typing a line.
|
||||
The text of the prompt can be set with the |prompt_setprompt()| function.
|
||||
|
||||
The user can go to Normal mode and navigate through the buffer. This can be
|
||||
useful see older output or copy text.
|
||||
useful to see older output or copy text.
|
||||
|
||||
The CTRL-W key can be used to start a window command, such as CTRL-W w to
|
||||
switch to the next window. This also works in Insert mode (use Shift-CTRL-W
|
||||
|
@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.2. Last change: 2020 Jun 05
|
||||
*editing.txt* For Vim version 8.2. Last change: 2020 Jul 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1402,7 +1402,7 @@ to 0, 'modeline' off, 'expandtab' off). Setting the 'binary' option has the
|
||||
same effect. Don't forget to do this before reading the file.
|
||||
|
||||
There are a few things to remember when editing binary files:
|
||||
- When editing executable files the number of characters must not change.
|
||||
- When editing executable files the number of bytes must not change.
|
||||
Use only the "R" or "r" command to change text. Do not delete characters
|
||||
with "x" or by backspacing.
|
||||
- Set the 'textwidth' option to 0. Otherwise lines will unexpectedly be
|
||||
@ -1410,7 +1410,7 @@ There are a few things to remember when editing binary files:
|
||||
- When there are not many <EOL>s, the lines will become very long. If you
|
||||
want to edit a line that does not fit on the screen reset the 'wrap' option.
|
||||
Horizontal scrolling is used then. If a line becomes too long (more than
|
||||
about 32767 characters on the Amiga, much more on 32-bit systems, see
|
||||
about 32767 bytes on the Amiga, much more on 32-bit and 64-bit systems, see
|
||||
|limits|) you cannot edit that line. The line will be split when reading
|
||||
the file. It is also possible that you get an "out of memory" error when
|
||||
reading the file.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Jun 30
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Jul 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -3036,7 +3036,8 @@ append({lnum}, {text}) *append()*
|
||||
:let failed = append(line('$'), "# THE END")
|
||||
:let failed = append(0, ["Chapter 1", "the beginning"])
|
||||
|
||||
< Can also be used as a |method| after a List: >
|
||||
< Can also be used as a |method| after a List, the base is
|
||||
passed as the second argument: >
|
||||
mylist->append(lnum)
|
||||
|
||||
|
||||
@ -3058,7 +3059,8 @@ appendbufline({expr}, {lnum}, {text}) *appendbufline()*
|
||||
error message is given. Example: >
|
||||
:let failed = appendbufline(13, 0, "# THE START")
|
||||
<
|
||||
Can also be used as a |method| after a List: >
|
||||
< Can also be used as a |method| after a List, the base is
|
||||
passed as the second argument: >
|
||||
mylist->appendbufline(buf, lnum)
|
||||
|
||||
|
||||
@ -3902,6 +3904,7 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698*
|
||||
changing an item in the copy does not change the contents of
|
||||
the original |List|.
|
||||
A |Dictionary| is copied in a similar way as a |List|.
|
||||
|
||||
When {noref} is omitted or zero a contained |List| or
|
||||
|Dictionary| is only copied once. All references point to
|
||||
this single copy. With {noref} set to 1 every occurrence of a
|
||||
@ -4838,12 +4841,14 @@ get({list}, {idx} [, {default}]) *get()*
|
||||
Get item {idx} from |List| {list}. When this item is not
|
||||
available return {default}. Return zero when {default} is
|
||||
omitted.
|
||||
Can also be used as a |method|: >
|
||||
Preferably used as a |method|: >
|
||||
mylist->get(idx)
|
||||
get({blob}, {idx} [, {default}])
|
||||
Get byte {idx} from |Blob| {blob}. When this byte is not
|
||||
available return {default}. Return -1 when {default} is
|
||||
omitted.
|
||||
Preferably used as a |method|: >
|
||||
myblob->get(idx)
|
||||
get({dict}, {key} [, {default}])
|
||||
Get item with key {key} from |Dictionary| {dict}. When this
|
||||
item is not available return {default}. Return zero when
|
||||
@ -4851,6 +4856,8 @@ get({dict}, {key} [, {default}])
|
||||
let val = get(g:, 'var_name', 'default')
|
||||
< This gets the value of g:var_name if it exists, and uses
|
||||
'default' when it does not exist.
|
||||
Preferably used as a |method|: >
|
||||
mydict->get(key)
|
||||
get({func}, {what})
|
||||
Get an item with from Funcref {func}. Possible values for
|
||||
{what} are:
|
||||
@ -4858,7 +4865,9 @@ get({func}, {what})
|
||||
"func" The function
|
||||
"dict" The dictionary
|
||||
"args" The list with arguments
|
||||
|
||||
Preferably used as a |method|: >
|
||||
myfunc->get(what)
|
||||
<
|
||||
*getbufinfo()*
|
||||
getbufinfo([{expr}])
|
||||
getbufinfo([{dict}])
|
||||
@ -9013,6 +9022,8 @@ setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()*
|
||||
Otherwise, same as |setqflist()|.
|
||||
Also see |location-list|.
|
||||
|
||||
For {action} see |setqflist-action|.
|
||||
|
||||
If the optional {what} dictionary argument is supplied, then
|
||||
only the items listed in {what} are set. Refer to |setqflist()|
|
||||
for the list of supported keys in {what}.
|
||||
@ -9091,7 +9102,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
only the items listed in {what} are set. The first {list}
|
||||
argument is ignored. See below for the supported items in
|
||||
{what}.
|
||||
|
||||
*setqflist-what*
|
||||
When {what} is not present, the items in {list} or used. Each
|
||||
item must be a dictionary. Non-dictionary items in {list} are
|
||||
ignored. Each dictionary item can contain the following
|
||||
@ -9128,7 +9139,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
Note that the list is not exactly the same as what
|
||||
|getqflist()| returns.
|
||||
|
||||
{action} values: *E927*
|
||||
{action} values: *setqflist-action* *E927*
|
||||
'a' The items from {list} are added to the existing
|
||||
quickfix list. If there is no existing list, then a
|
||||
new list is created.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Jun 10
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Jul 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2020 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1279,7 +1279,7 @@ not match in "càt" (where the a has the composing character 0x0300), but
|
||||
0xe1, it does not have a compositing character). It does match "cat" (where
|
||||
the a is just an a).
|
||||
|
||||
When a composing character appears at the start of the pattern of after an
|
||||
When a composing character appears at the start of the pattern or after an
|
||||
item that doesn't include the composing character, a match is found at any
|
||||
character that includes this composing character.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 8.2. Last change: 2020 Jun 10
|
||||
*spell.txt* For Vim version 8.2. Last change: 2020 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -653,11 +653,12 @@ ask you where to write the file (there must be a writable directory in
|
||||
'runtimepath' for this).
|
||||
|
||||
The plugin has a default place where to look for spell files, on the Vim ftp
|
||||
server. If you want to use another location or another protocol, set the
|
||||
g:spellfile_URL variable to the directory that holds the spell files. The
|
||||
|netrw| plugin is used for getting the file, look there for the specific
|
||||
syntax of the URL. Example: >
|
||||
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
|
||||
server. The protocol used is SSL (https://) for security. If you want to use
|
||||
another location or another protocol, set the g:spellfile_URL variable to the
|
||||
directory that holds the spell files. You can use http:// or ftp://, but you
|
||||
are taking a security risk then. The |netrw| plugin is used for getting the
|
||||
file, look there for the specific syntax of the URL. Example: >
|
||||
let g:spellfile_URL = 'https://ftp.nluug.nl/vim/runtime/spell'
|
||||
You may need to escape special characters.
|
||||
|
||||
The plugin will only ask about downloading a language once. If you want to
|
||||
|
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2020 Jun 01
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2020 Jul 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1403,7 +1403,7 @@ to your startup file.
|
||||
|
||||
EUPHORIA *euphoria3.vim* *euphoria4.vim* *ft-euphoria-syntax*
|
||||
|
||||
Two syntax highlighting files exists for Euphoria. One for Euphoria
|
||||
Two syntax highlighting files exist for Euphoria. One for Euphoria
|
||||
version 3.1.1, which is the default syntax highlighting file, and one for
|
||||
Euphoria version 4.0.5 or later.
|
||||
|
||||
|
@ -4699,6 +4699,7 @@ E855 autocmd.txt /*E855*
|
||||
E858 eval.txt /*E858*
|
||||
E859 eval.txt /*E859*
|
||||
E86 windows.txt /*E86*
|
||||
E860 textprop.txt /*E860*
|
||||
E861 popup.txt /*E861*
|
||||
E862 eval.txt /*E862*
|
||||
E863 popup.txt /*E863*
|
||||
@ -8820,7 +8821,9 @@ setloclist() eval.txt /*setloclist()*
|
||||
setmatches() eval.txt /*setmatches()*
|
||||
setpos() eval.txt /*setpos()*
|
||||
setqflist() eval.txt /*setqflist()*
|
||||
setqflist-action eval.txt /*setqflist-action*
|
||||
setqflist-examples quickfix.txt /*setqflist-examples*
|
||||
setqflist-what eval.txt /*setqflist-what*
|
||||
setreg() eval.txt /*setreg()*
|
||||
settabvar() eval.txt /*settabvar()*
|
||||
settabwinvar() eval.txt /*settabwinvar()*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 8.2. Last change: 2020 Jun 15
|
||||
*testing.txt* For Vim version 8.2. Last change: 2020 Jul 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -264,7 +264,8 @@ assert_equal({expected}, {actual} [, {msg}])
|
||||
< Will result in a string to be added to |v:errors|:
|
||||
test.vim line 12: Expected 'foo' but got 'bar' ~
|
||||
|
||||
Can also be used as a |method|: >
|
||||
Can also be used as a |method|, the base is passed as the
|
||||
second argument: >
|
||||
mylist->assert_equal([1, 2, 3])
|
||||
|
||||
< *assert_equalfile()*
|
||||
|
@ -220,7 +220,7 @@ prop_list({lnum} [, {props}]) *prop_list()*
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->prop_list()
|
||||
<
|
||||
*prop_remove()* *E968*
|
||||
*prop_remove()* *E968* *E860*
|
||||
prop_remove({props} [, {lnum} [, {lnum-end}]])
|
||||
Remove a matching text property from line {lnum}. When
|
||||
{lnum-end} is given, remove matching text properties from line
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Jun 28
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -38,38 +38,22 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Include src/po/vim.pot ?
|
||||
|
||||
Vim9 script:
|
||||
- line continuation at script level:
|
||||
eval_to_string_skip(), test with :throw
|
||||
eval1_emsg(), pass "eap", test with :execute, :echomsg, :echoerr
|
||||
handle_subscript() - call_func_rettv() - get_func_tv()
|
||||
func(
|
||||
args arg)
|
||||
callers of get_func_tv():
|
||||
eval_func()
|
||||
ex_call()
|
||||
function arguments, test assert_equal() with lambda, test :function
|
||||
:import:
|
||||
others
|
||||
eval_index()
|
||||
- test:
|
||||
[1,
|
||||
2,
|
||||
3]->Func()
|
||||
|
||||
Making everything work:
|
||||
- "nr += 4" gives "already defined" error.
|
||||
- Error for "g:var: string = 'value'"
|
||||
- Make func()->append('$') work - value is last argument, not first. #6305
|
||||
- in Vim9 script expressions are evaluated differently, not using a type.
|
||||
e.g. "'' == 0" does not give an error and evaluates to true.
|
||||
- possible memory leak in test_vim9_func through compile_nested_function.
|
||||
- memory leaks in test_vim9_expr
|
||||
- memory leaks in test_vim9_script
|
||||
- cannot put # comment after assert() in :def function
|
||||
- more return types depending on the first argument, like sort().
|
||||
- Check that when sourcing a Vim9 script, only the global items can be used.
|
||||
- :put with a "=" register argument doesn't work, need to find the expression
|
||||
and compile it. (#6397)
|
||||
- should "'text'->method()" work? 't is a range, but 'text isn't.
|
||||
- Slice of list: [1, 2, 3][1:2].
|
||||
- Give runtime error if function argument is wrong.
|
||||
def Increment(nr: number)
|
||||
range(3)->Increment()
|
||||
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||
- Expand `=expr` in :mkspell
|
||||
- Make "true" and "false" work in vim9script
|
||||
- Test that a function defined inside a :def function is local to that
|
||||
function, g: functions can be defined and script-local functions cannot be
|
||||
@ -87,9 +71,10 @@ Making everything work:
|
||||
- Compile redir to local variable: var_redir_start().
|
||||
- Compile builtin functions that access local variables:
|
||||
islocked()
|
||||
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||
- Expand `=expr` in :mkspell
|
||||
- possible memory leak in test_vim9_func through compile_nested_function.
|
||||
- memory leaks in test_vim9_expr
|
||||
- memory leaks in test_vim9_script
|
||||
- memory leaks in test_vim9_cmd
|
||||
- When evaluating constants for script variables, some functions could work:
|
||||
has('asdf'), len('string')
|
||||
- Support type for ":let"/":const" at script level for Vim9 script.
|
||||
@ -340,6 +325,9 @@ When changing the crypt key the buffer should be considered modified.
|
||||
Like when changing 'fileformat'. Save the old key in save_file_ff().
|
||||
(Ninu-Ciprian Marginean)
|
||||
|
||||
Patch to implement the vimtutor with a plugin: #6414
|
||||
Was originally writtten by Felipe Morales.
|
||||
|
||||
Strange sequence of BufWipeout and BufNew events while doing omni-complete.
|
||||
(Paul Jolly, #5656)
|
||||
Get BufDelete without preceding BufNew. (Paul Jolly, #5694)
|
||||
@ -1074,7 +1062,7 @@ Problem with three-piece comment. (Michael Lee, 2017 May 11, #1696)
|
||||
|
||||
Creating a partial with an autoload function is confused about the "self"
|
||||
attribute of the function. For an unknown function assume "self" and make
|
||||
that optiona? (Bjorn Linse, 2017 Aug 5)
|
||||
that optional? (Bjorn Linse, 2017 Aug 5)
|
||||
|
||||
Cindent: returning a structure has more indent for the second item.
|
||||
(Sam Pagenkopf, 2017 Sep 14, #2090)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_11.txt* For Vim version 8.2. Last change: 2020 Jan 17
|
||||
*usr_11.txt* For Vim version 8.2. Last change: 2020 Jul 08
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -256,7 +256,7 @@ O Open the file readonly. Use this when you just want to view the file and
|
||||
|
||||
E Edit the file anyway. Use this with caution! If the file is being edited
|
||||
in another Vim, you might end up with two versions of the file. Vim will
|
||||
try to warn you when this happens, but better be safe then sorry.
|
||||
try to warn you when this happens, but better be safe than sorry.
|
||||
|
||||
R Recover the file from the swap file. Use this if you know that the swap
|
||||
file contains changes that you want to recover.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 8.2. Last change: 2020 May 30
|
||||
*various.txt* For Vim version 8.2. Last change: 2020 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -754,7 +754,7 @@ up mappings to simulate the commands that less supports. Otherwise, you can
|
||||
still use the Vim commands.
|
||||
|
||||
This isn't perfect. For example, when viewing a short file Vim will still use
|
||||
the whole screen. But it works good enough for most uses, and you get syntax
|
||||
the whole screen. But it works well enough for most uses, and you get syntax
|
||||
highlighting.
|
||||
|
||||
The "h" key will give you a short overview of the available commands.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Jun 24
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -64,16 +64,20 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
Comments starting with # ~
|
||||
|
||||
In Vim script comments normally start with double quote. That can also be the
|
||||
start of a string, thus in many places it cannot be used. In Vim9 script a
|
||||
comment can also start with #. In Vi this is a command to list text with
|
||||
numbers, but you can also use `:number` for that. >
|
||||
In Vim script comments start with double quote. That can also be the start of
|
||||
a string, thus in many places it cannot be used. In Vim9 script a comment
|
||||
normally starts with #. In Vi this is a command to list text with numbers,
|
||||
but you can also use `:number` for that. >
|
||||
let count = 0 # number of occurrences
|
||||
|
||||
To improve readability there must be a space between the command and the #
|
||||
that starts a comment. Note that #{ is the start of a dictionary, therefore
|
||||
it cannot start a comment.
|
||||
|
||||
Since Vim9 script allows for line breaks in many places, the double quoted
|
||||
comment also cannot be used at the start of a line after an expression. To
|
||||
avoid confusion it is best to only use # comments.
|
||||
|
||||
|
||||
Vim9 functions ~
|
||||
|
||||
@ -276,10 +280,13 @@ possible just before or after the operator. For example: >
|
||||
|
||||
< *E1050*
|
||||
To make it possible for the operator at the start of the line to be
|
||||
recognized, it is required to put a colon before a range. This will adde
|
||||
recognized, it is required to put a colon before a range. This will add
|
||||
"start" and print: >
|
||||
let result = start
|
||||
+ print
|
||||
Like this: >
|
||||
let result = start + print
|
||||
|
||||
This will assign "start" and print a line: >
|
||||
let result = start
|
||||
:+ print
|
||||
@ -291,8 +298,32 @@ arguments: >
|
||||
separator = '-'
|
||||
): string
|
||||
|
||||
Note that "enddef" cannot be used at the start of a continuation line, it ends
|
||||
the current function.
|
||||
Notes:
|
||||
- "enddef" cannot be used at the start of a continuation line, it ends the
|
||||
current function.
|
||||
- No line break is allowed in the LHS of an assignment. Specifically when
|
||||
unpacking a list |:let-unpack|. This is OK: >
|
||||
[var1, var2] =
|
||||
Func()
|
||||
< This does not work: >
|
||||
[var1,
|
||||
var2] =
|
||||
Func()
|
||||
- No line break is allowed in between arguments of an `:echo`, `:execute` and
|
||||
similar commands. This is OK: >
|
||||
echo [1,
|
||||
2] [3,
|
||||
4]
|
||||
< This does not work: >
|
||||
echo [1, 2]
|
||||
[3, 4]
|
||||
- No line break is allowed in the arguments of a lambda, between the "{" and
|
||||
"->". This is OK: >
|
||||
filter(list, {k, v ->
|
||||
v > 0})
|
||||
< This does not work: >
|
||||
filter(list, {k,
|
||||
v -> v > 0})
|
||||
|
||||
|
||||
No curly braces expansion ~
|
||||
@ -318,7 +349,8 @@ Vim9 script enforces proper use of white space. This is no longer allowed: >
|
||||
let var =234 " Error!
|
||||
There must be white space before and after the "=": >
|
||||
let var = 234 " OK
|
||||
White space must also be put before the # that starts a comment: >
|
||||
White space must also be put before the # that starts a comment after a
|
||||
command: >
|
||||
let var = 234# Error!
|
||||
let var = 234 # OK
|
||||
|
||||
@ -479,6 +511,22 @@ prefix.
|
||||
Note that for command line completion of {func} you
|
||||
can prepend "s:" to find script-local functions.
|
||||
|
||||
Limitations ~
|
||||
|
||||
Local variables will not be visible to string evaluation. For example: >
|
||||
def EvalString(): list<string>
|
||||
let list = ['aa', 'bb', 'cc', 'dd']
|
||||
return range(1, 2)->map('list[v:val]')
|
||||
enddef
|
||||
|
||||
The map argument is a string expression, which is evaluated without the
|
||||
function scope. Instead, use a lambda: >
|
||||
def EvalString(): list<string>
|
||||
let list = ['aa', 'bb', 'cc', 'dd']
|
||||
return range(1, 2)->map({ _, v -> list[v] })
|
||||
enddef
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
4. Types *vim9-types*
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jun 16
|
||||
" Last Change: 2020 Jul 06
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -49,14 +49,14 @@ setlocal isk+=#
|
||||
setlocal keywordprg=:help
|
||||
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",:#
|
||||
|
||||
" Format comments to be up to 78 characters long
|
||||
if &tw == 0
|
||||
setlocal tw=78
|
||||
endif
|
||||
|
||||
" Comments start with a double quote
|
||||
" Comments start with a double quote; in Vim9 script # would also work
|
||||
setlocal commentstring=\"%s
|
||||
|
||||
if !exists("no_plugin_maps") && !exists("no_vim_maps")
|
||||
|
@ -10,5 +10,5 @@ test:
|
||||
VIMRUNTIME=$(VIMRUNTIME) $(VIM) --clean --not-a-term -u testdir/runtest.vim
|
||||
|
||||
|
||||
clean:
|
||||
clean testclean:
|
||||
rm -f testdir/*.fail testdir/*.out
|
||||
|
@ -1,9 +1,8 @@
|
||||
" Vim indent script for HTML
|
||||
" Header: "{{{
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2020 Jun 18
|
||||
" Version: 1.0
|
||||
" Last Change: 2020 Jul 06
|
||||
" Version: 1.0 "{{{
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
" Supports template systems through hooks.
|
||||
@ -587,7 +586,7 @@ func! s:Alien3()
|
||||
return eval(b:hi_js1indent)
|
||||
endif
|
||||
if b:hi_indent.scripttype == "javascript"
|
||||
return GetJavascriptIndent()
|
||||
return eval(b:hi_js1indent) + GetJavascriptIndent()
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
|
@ -2,6 +2,16 @@
|
||||
|
||||
|
||||
" START_INDENT
|
||||
<html>
|
||||
<body>
|
||||
<style>
|
||||
div#d1 { color: red; }
|
||||
div#d2 { color: green; }
|
||||
</style>
|
||||
<script>
|
||||
var v1 = "v1";
|
||||
var v2 = "v2";
|
||||
</script>
|
||||
<div>
|
||||
<div>
|
||||
text
|
||||
@ -32,5 +42,25 @@ dt text
|
||||
</dt>
|
||||
</dl>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
" END_INDENT
|
||||
|
||||
% START_INDENT
|
||||
% INDENT_EXE let g:html_indent_style1 = "inc"
|
||||
% INDENT_EXE let g:html_indent_script1 = "zero"
|
||||
% INDENT_EXE call HtmlIndent_CheckUserSettings()
|
||||
<html>
|
||||
<body>
|
||||
<style>
|
||||
div#d1 { color: red; }
|
||||
div#d2 { color: green; }
|
||||
</style>
|
||||
<script>
|
||||
var v1 = "v1";
|
||||
var v2 = "v2";
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
% END_INDENT
|
||||
|
@ -2,6 +2,16 @@
|
||||
|
||||
|
||||
" START_INDENT
|
||||
<html>
|
||||
<body>
|
||||
<style>
|
||||
div#d1 { color: red; }
|
||||
div#d2 { color: green; }
|
||||
</style>
|
||||
<script>
|
||||
var v1 = "v1";
|
||||
var v2 = "v2";
|
||||
</script>
|
||||
<div>
|
||||
<div>
|
||||
text
|
||||
@ -32,5 +42,25 @@
|
||||
</dt>
|
||||
</dl>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
" END_INDENT
|
||||
|
||||
% START_INDENT
|
||||
% INDENT_EXE let g:html_indent_style1 = "inc"
|
||||
% INDENT_EXE let g:html_indent_script1 = "zero"
|
||||
% INDENT_EXE call HtmlIndent_CheckUserSettings()
|
||||
<html>
|
||||
<body>
|
||||
<style>
|
||||
div#d1 { color: red; }
|
||||
div#d2 { color: green; }
|
||||
</style>
|
||||
<script>
|
||||
var v1 = "v1";
|
||||
var v2 = "v2";
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
% END_INDENT
|
||||
|
779
src/po/de.po
779
src/po/de.po
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user