mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
runtime(vim): Update ftplugin - comment motions (#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. Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
0ab500dede
commit
fea96c00e5
@ -85,8 +85,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]\\|\(export\s\+\)\?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
|
||||
|
Loading…
x
Reference in New Issue
Block a user