]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(man): use `nnoremap` to map to Ex commands
authorIvan Shapovalov <intelfx@intelfx.name>
Sat, 6 Jul 2024 14:16:40 +0000 (16:16 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 6 Jul 2024 14:17:07 +0000 (16:17 +0200)
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>
runtime/ftplugin/man.vim

index 91e8a8b78c1d37bc0dcdc9384f411f91ff9560a5..87484bf691cee2b944b38ba5292c5f24336d9010 100644 (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