aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-10-23 18:20:12 +0200
committerChristian Clason <c.clason@uni-graz.at>2023-10-23 19:48:50 +0200
commite606604322815abd3dc91a5595a0aa976a9aded7 (patch)
tree683d5141b75a6ff9f631a4e3e2cae19f86d47c02
parent94127cb5df0a513e66777d18a2c7fa6219404280 (diff)
downloadrneovim-e606604322815abd3dc91a5595a0aa976a9aded7.tar.gz
rneovim-e606604322815abd3dc91a5595a0aa976a9aded7.tar.bz2
rneovim-e606604322815abd3dc91a5595a0aa976a9aded7.zip
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>
-rw-r--r--runtime/ftplugin/vim.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim
index 3b10c95c80..06369e8a82 100644
--- 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