aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/man.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ftplugin/man.vim')
-rw-r--r--runtime/ftplugin/man.vim11
1 files changed, 5 insertions, 6 deletions
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 6c7f095f62..0416e41368 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -1,4 +1,4 @@
-" Maintainer: Anmol Sethi <anmol@aubble.com>
+" Maintainer: Anmol Sethi <hi@nhooyr.io>
" Previous Maintainer: SungHyun Nam <goweol@gmail.com>
if exists('b:did_ftplugin') || &filetype !=# 'man'
@@ -6,7 +6,7 @@ if exists('b:did_ftplugin') || &filetype !=# 'man'
endif
let b:did_ftplugin = 1
-let s:pager = get(s:, 'pager', 0) || !exists('b:man_sect')
+let s:pager = !exists('b:man_sect')
if s:pager
call man#init_pager()
@@ -20,14 +20,13 @@ setlocal wrap breakindent linebreak
setlocal nonumber norelativenumber
setlocal foldcolumn=0 colorcolumn=0 nolist nofoldenable
+setlocal tagfunc=man#goto_tag
+
if !exists('g:no_plugin_maps') && !exists('g:no_man_maps')
nnoremap <silent> <buffer> j gj
nnoremap <silent> <buffer> k gk
nnoremap <silent> <buffer> gO :call man#show_toc()<CR>
- nnoremap <silent> <buffer> <C-]> :Man<CR>
- nnoremap <silent> <buffer> K :Man<CR>
- nnoremap <silent> <buffer> <C-T> :call man#pop_tag()<CR>
- if 1 == bufnr('%') || s:pager
+ if s:pager
nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR>
else
nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c