mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
man.vim: infer $MANPAGER invocation in more cases
This should handle most cases where Nvim was invoked as $MANPAGER. Ultimately the stakes are low: :quit will prompt if there are unsaved changes. fix #7873
This commit is contained in:
parent
20e0cb8d47
commit
94f4469638
@ -6,7 +6,7 @@ if exists('b:did_ftplugin') || &filetype !=# 'man'
|
|||||||
endif
|
endif
|
||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
let s:pager = !exists('b:man_sect')
|
let s:pager = get(s:, 'pager', 0) || !exists('b:man_sect')
|
||||||
|
|
||||||
if s:pager
|
if s:pager
|
||||||
call man#init_pager()
|
call man#init_pager()
|
||||||
@ -35,7 +35,7 @@ if !exists('g:no_plugin_maps') && !exists('g:no_man_maps')
|
|||||||
nnoremap <silent> <buffer> <C-]> :Man<CR>
|
nnoremap <silent> <buffer> <C-]> :Man<CR>
|
||||||
nnoremap <silent> <buffer> K :Man<CR>
|
nnoremap <silent> <buffer> K :Man<CR>
|
||||||
nnoremap <silent> <buffer> <C-T> :call man#pop_tag()<CR>
|
nnoremap <silent> <buffer> <C-T> :call man#pop_tag()<CR>
|
||||||
if s:pager
|
if 1 == bufnr('%') || s:pager
|
||||||
nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR>
|
nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR>
|
||||||
else
|
else
|
||||||
nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c
|
nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c
|
||||||
|
Loading…
Reference in New Issue
Block a user