0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

runtime(man): use nnoremap to map to Ex commands

If the user plays rebinding games such as

    nnoremap : ,
    nnoremap , :

(cf. https://konfekt.github.io/blog/2016/10/03/get-the-leader-right),
then the mappings defined by man.vim will become non-functional.

closes: #15130

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Ivan Shapovalov 2024-07-06 16:16:40 +02:00 committed by Christian Brabandt
parent 65407ce1d2
commit f21ca6d1f1
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -61,8 +61,8 @@ endif
if exists(":Man") != 2
com -nargs=+ -complete=shellcmd Man call dist#man#GetPage(<q-mods>, <f-args>)
nmap <Leader>K :call dist#man#PreGetPage(0)<CR>
nmap <Plug>ManPreGetPage :call dist#man#PreGetPage(0)<CR>
nnoremap <Leader>K :call dist#man#PreGetPage(0)<CR>
nnoremap <Plug>ManPreGetPage :call dist#man#PreGetPage(0)<CR>
endif
let &cpo = s:cpo_save