neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 7a309311a2c6858c9cd59db47becf4c9baaa9bfe
parent 99ef06d8467968ac262b875ef840fd0f5415e402
Author: Christian Clason <c.clason@uni-graz.at>
Date:   Mon, 20 Jun 2022 18:47:30 +0200

vim-patch:d799daa660b8 (#19031)

Update runtime files
https://github.com/vim/vim/commit/d799daa660b8821943cbe1682f00da9e812dd48c
Diffstat:
Mruntime/doc/builtin.txt | 2+-
Mruntime/doc/map.txt | 10+---------
Mruntime/doc/visual.txt | 7+++++++
Druntime/indent/confini.vim | 10----------
Druntime/indent/systemd.vim | 10----------
Mruntime/indent/yaml.vim | 40++++++++++++++++++++--------------------
Mruntime/syntax/vim.vim | 2+-
7 files changed, 30 insertions(+), 51 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 " =============