Skip to content

Commit 1c4f402

Browse files
saccarosiumchrisbra
authored andcommitted
runtime(man): Fix <Plug>ManBS
This change does 2 things: - make sure the mapping <Plug>ManBS sets the buffer to modified to avoid a potential error message - remove commented q mapping fixes #15538 closes: #15547 Signed-off-by: Luca Saccarola <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 2750b83 commit 1c4f402

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

runtime/ftplugin/man.vim

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
" Autoload Split: Bram Moolenaar
66
" Last Change: 2024 Jun 06 (disabled the q mapping, #8210)
77
" 2024 Jul 06 (use nnoremap, #15130)
8+
" 2024 Aug 22 (fix the <Plug>ManBS mapping, #15547)
89

910
" To make the ":Man" command available before editing a manual page, source
1011
" this script from your startup vimrc file.
@@ -36,20 +37,16 @@ if &filetype == "man"
3637
let b:undo_ftplugin = b:undo_ftplugin
3738
\ . '|silent! nunmap <buffer> <LocalLeader>h'
3839
endif
39-
nnoremap <buffer> <Plug>ManBS :%s/.\b//g<CR>:setl nomod<CR>''
40+
nnoremap <buffer> <Plug>ManBS :setl ma<bar>%s/.\b//ge<bar>setl noma<CR>
4041
4142
nnoremap <buffer> <silent> <c-]> :call dist#man#PreGetPage(v:count)<CR>
4243
nnoremap <buffer> <silent> <c-t> :call dist#man#PopPage()<CR>
43-
" Disabled, since this hides the ability to record a macro or use the
44-
" command line window
45-
" nnoremap <buffer> <silent> q :q<CR>
4644
4745
" Add undo commands for the maps
4846
let b:undo_ftplugin = b:undo_ftplugin
4947
\ . '|silent! nunmap <buffer> <Plug>ManBS'
5048
\ . '|silent! nunmap <buffer> <c-]>'
5149
\ . '|silent! nunmap <buffer> <c-t>'
52-
"\ . '|silent! nunmap <buffer> q'
5350
endif
5451

5552
if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1)

0 commit comments

Comments
 (0)