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.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 133a28e626..04ab539fb1 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -24,14 +24,18 @@ setlocal buftype=nofile noswapfile
setlocal nomodifiable readonly bufhidden=hide nobuflisted tabstop=8
if !exists("g:no_plugin_maps") && !exists("g:no_man_maps")
- nnoremap <silent> <buffer> <C-]> :call man#get_page(v:count)<CR>
+ nnoremap <silent> <buffer> <C-]> :call man#get_page(v:count, expand('<cword>'))<CR>
nnoremap <silent> <buffer> <C-T> :call man#pop_page()<CR>
nnoremap <silent> <nowait><buffer> q <C-W>c
if &keywordprg !=# ':Man'
- nnoremap <silent> <buffer> K :call man#get_page(v:count)<CR>
+ nnoremap <silent> <buffer> K :call man#get_page(v:count, expand('<cword>'))<CR>
endif
endif
+if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1)
+ setlocal foldmethod=indent foldnestmax=1 foldenable
+endif
+
let b:undo_ftplugin = 'setlocal iskeyword<'
" vim: set sw=2: