aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-06-20 18:47:30 +0200
committerGitHub <noreply@github.com>2022-06-20 18:47:30 +0200
commit7a309311a2c6858c9cd59db47becf4c9baaa9bfe (patch)
tree4a037c0c0c5ff91d6efe422c503b64353d74dce7
parent99ef06d8467968ac262b875ef840fd0f5415e402 (diff)
downloadrneovim-7a309311a2c6858c9cd59db47becf4c9baaa9bfe.tar.gz
rneovim-7a309311a2c6858c9cd59db47becf4c9baaa9bfe.tar.bz2
rneovim-7a309311a2c6858c9cd59db47becf4c9baaa9bfe.zip
vim-patch:d799daa660b8 (#19031)
Update runtime files https://github.com/vim/vim/commit/d799daa660b8821943cbe1682f00da9e812dd48c
-rw-r--r--runtime/doc/builtin.txt2
-rw-r--r--runtime/doc/map.txt10
-rw-r--r--runtime/doc/visual.txt7
-rw-r--r--runtime/indent/confini.vim10
-rw-r--r--runtime/indent/systemd.vim10
-rw-r--r--runtime/indent/yaml.vim40
-rw-r--r--runtime/syntax/vim.vim2
7 files changed, 30 insertions, 51 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 54eac87070..ac42b315a4 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -2364,7 +2364,7 @@ fnamemodify({fname}, {mods}) *fnamemodify()*
Example: >
:echo fnamemodify("main.c", ":p:h")
< results in: >
- /home/mool/vim/vim/src
+ /home/user/vim/vim/src
< If {mods} is empty or an unsupported modifier is used then
{fname} is returned.
Note: Environment variables don't work in {fname}, use
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 2206d13053..05cf30e078 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -345,15 +345,7 @@ Note:
mapping is recursive.
- In Visual mode you can use `line('v')` and `col('v')` to get one end of the
Visual area, the cursor is at the other end.
-- In Select mode, |:map| and |:vmap| command mappings are executed in
- Visual mode. Use |:smap| to handle Select mode differently. One particular
- edge case: >
- :vnoremap <C-K> <Esc>
-< This ends Visual mode when in Visual mode, but in Select mode it does not
- work, because Select mode is restored after executing the mapped keys. You
- need to use: >
- :snoremap <C-K> <Esc>
-<
+
*E5520*
<Cmd> commands must terminate, that is, they must be followed by <CR> in the
{rhs} of the mapping definition. |Command-line| mode is never entered.
diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt
index 193c70e70a..905ae49887 100644
--- a/runtime/doc/visual.txt
+++ b/runtime/doc/visual.txt
@@ -499,6 +499,13 @@ work both in Visual mode and in Select mode. When these are used in Select
mode Vim automatically switches to Visual mode, so that the same behavior as
in Visual mode is effective. If you don't want this use |:xmap| or |:smap|.
+One particular edge case: >
+ :vnoremap <C-K> <Esc>
+This ends Visual mode when in Visual mode, but in Select mode it does not
+work, because Select mode is restored after executing the mapped keys. You
+need to use: >
+ :snoremap <C-K> <Esc>
+<
Users will expect printable characters to replace the selected area.
Therefore avoid mapping printable characters in Select mode. Or use
|:sunmap| after |:map| and |:vmap| to remove it for Select mode.
diff --git a/runtime/indent/confini.vim b/runtime/indent/confini.vim
deleted file mode 100644
index 50b3dd20c0..0000000000
--- a/runtime/indent/confini.vim
+++ /dev/null
@@ -1,10 +0,0 @@
-" Vim indent file
-" Language: confini
-
-" Quit if an indent file was already loaded.
-if exists("b:did_indent")
- finish
-endif
-
-" Use the cfg indenting, it's similar enough.
-runtime! indent/cfg.vim
diff --git a/runtime/indent/systemd.vim b/runtime/indent/systemd.vim
deleted file mode 100644
index a05a87bb1c..0000000000
--- a/runtime/indent/systemd.vim
+++ /dev/null
@@ -1,10 +0,0 @@
-" Vim indent file
-" Language: systemd.unit(5)
-
-" Only load this indent file when no other was loaded.
-if exists("b:did_indent")
- finish
-endif
-
-" Looks a lot like dosini files.
-runtime! indent/dosini.vim
diff --git a/runtime/indent/yaml.vim b/runtime/indent/yaml.vim
index 1f798416ed..d732c37c05 100644
--- a/runtime/indent/yaml.vim
+++ b/runtime/indent/yaml.vim
@@ -2,7 +2,7 @@
" Language: YAML
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
" Last Update: Lukas Reineke
-" Last Change: 2022 May 02
+" Last Change: 2022 Jun 17
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -44,30 +44,30 @@ function s:FindPrevLEIndentedLineMatchingRegex(lnum, regex)
return plilnum
endfunction
-let s:mapkeyregex='\v^\s*\#@!\S@=%(\''%([^'']|\''\'')*\'''.
- \ '|\"%([^"\\]|\\.)*\"'.
+let s:mapkeyregex = '\v^\s*\#@!\S@=%(\''%([^'']|\''\'')*\''' ..
+ \ '|\"%([^"\\]|\\.)*\"' ..
\ '|%(%(\:\ )@!.)*)\:%(\ |$)'
-let s:liststartregex='\v^\s*%(\-%(\ |$))'
+let s:liststartregex = '\v^\s*%(\-%(\ |$))'
let s:c_ns_anchor_char = '\v%([\n\r\uFEFF \t,[\]{}]@!\p)'
-let s:c_ns_anchor_name = s:c_ns_anchor_char.'+'
-let s:c_ns_anchor_property = '\v\&'.s:c_ns_anchor_name
+let s:c_ns_anchor_name = s:c_ns_anchor_char .. '+'
+let s:c_ns_anchor_property = '\v\&' .. s:c_ns_anchor_name
let s:ns_word_char = '\v[[:alnum:]_\-]'
-let s:ns_tag_char = '\v%(%\x\x|'.s:ns_word_char.'|[#/;?:@&=+$.~*''()])'
-let s:c_named_tag_handle = '\v\!'.s:ns_word_char.'+\!'
+let s:ns_tag_char = '\v%(%\x\x|' .. s:ns_word_char .. '|[#/;?:@&=+$.~*''()])'
+let s:c_named_tag_handle = '\v\!' .. s:ns_word_char .. '+\!'
let s:c_secondary_tag_handle = '\v\!\!'
let s:c_primary_tag_handle = '\v\!'
-let s:c_tag_handle = '\v%('.s:c_named_tag_handle.
- \ '|'.s:c_secondary_tag_handle.
- \ '|'.s:c_primary_tag_handle.')'
-let s:c_ns_shorthand_tag = '\v'.s:c_tag_handle . s:ns_tag_char.'+'
+let s:c_tag_handle = '\v%(' .. s:c_named_tag_handle.
+ \ '|' .. s:c_secondary_tag_handle.
+ \ '|' .. s:c_primary_tag_handle .. ')'
+let s:c_ns_shorthand_tag = '\v' .. s:c_tag_handle .. s:ns_tag_char .. '+'
let s:c_non_specific_tag = '\v\!'
-let s:ns_uri_char = '\v%(%\x\x|'.s:ns_word_char.'\v|[#/;?:@&=+$,.!~*''()[\]])'
-let s:c_verbatim_tag = '\v\!\<'.s:ns_uri_char.'+\>'
-let s:c_ns_tag_property = '\v'.s:c_verbatim_tag.
- \ '\v|'.s:c_ns_shorthand_tag.
- \ '\v|'.s:c_non_specific_tag
+let s:ns_uri_char = '\v%(%\x\x|' .. s:ns_word_char .. '\v|[#/;?:@&=+$,.!~*''()[\]])'
+let s:c_verbatim_tag = '\v\!\<' .. s:ns_uri_char.. '+\>'
+let s:c_ns_tag_property = '\v' .. s:c_verbatim_tag.
+ \ '\v|' .. s:c_ns_shorthand_tag.
+ \ '\v|' .. s:c_non_specific_tag
let s:block_scalar_header = '\v[|>]%([+-]?[1-9]|[1-9]?[+-])?'
@@ -142,9 +142,9 @@ function GetYAMLIndent(lnum)
" - List with
" multiline scalar
return previndent+2
- elseif prevline =~# s:mapkeyregex . '\v\s*%(%('.s:c_ns_tag_property.
- \ '\v|'.s:c_ns_anchor_property.
- \ '\v|'.s:block_scalar_header.
+ elseif prevline =~# s:mapkeyregex .. '\v\s*%(%(' .. s:c_ns_tag_property ..
+ \ '\v|' .. s:c_ns_anchor_property ..
+ \ '\v|' .. s:block_scalar_header ..
\ '\v)%(\s+|\s*%(\#.*)?$))*'
" Mapping with: value
" that is multiline scalar
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 9917a7f694..76ad1d523d 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -368,7 +368,7 @@ syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
" Let: {{{2
" ===
syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
-VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$'
+VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\%(\s\+eval\)\=\|eval\%(\s\+trim\)\=\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$'
" Abbreviations: {{{2
" =============