neovim

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

commit e606604322815abd3dc91a5595a0aa976a9aded7
parent 94127cb5df0a513e66777d18a2c7fa6219404280
Author: Christian Clason <c.clason@uni-graz.at>
Date:   Mon, 23 Oct 2023 18:20:12 +0200

vim-patch:fea96c00e55a

runtime(vim): Update ftplugin - comment motions (vim/vim#13412)

Fix the pattern used by comment-motion mappings to match the start of a
block comment.

Block-comment start lines were being ignored if the previous line
contained a double-quote character anywhere in the line.  Line comments
should only be ignored if the previous line is a full-line comment and,
therefore, part of the current block comment.

https://github.com/vim/vim/commit/fea96c00e55a71e3007907ff4f7ad513bb9ff0eb

Co-authored-by: dkearns <dougkearns@gmail.com>

Diffstat:
Mruntime/ftplugin/vim.vim | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim @@ -84,8 +84,8 @@ if !exists("no_plugin_maps") && !exists("no_vim_maps") vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|def\)\>', "W")<CR> " Move around comments - nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> - vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> + nnoremap <silent><buffer> ]" :call search('\%(^\s*".*\n\)\@<!\%(^\s*"\)', "W")<CR> + vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\@<!\%(^\s*"\)', "W")<CR> nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> endif