man.vim: man#get_page(): parse page and section.

- Eliminate man#pre_get_page().
- Temporarily remove () from 'iskeyword' to avoid spurious \k match.
This commit is contained in:
Justin M. Keyes
2015-09-19 17:44:23 -04:00
parent 4fb75d61c2
commit 45724e2c41
2 changed files with 34 additions and 35 deletions

View File

@@ -14,21 +14,18 @@ if exists('$MANPAGER')
let $MANPAGER = ''
endif
" allow dot and dash in manual page name.
setlocal iskeyword+=\.,-,(,)
" Avoid warning for editing the dummy file twice
setlocal buftype=nofile noswapfile
setlocal nomodifiable readonly bufhidden=hide nobuflisted
setlocal tabstop=8 colorcolumn=0
if !exists("g:no_plugin_maps") && !exists("g:no_man_maps")
nnoremap <silent> <buffer> <C-]> :call man#pre_get_page(v:count)<CR>
nnoremap <silent> <buffer> <C-]> :call man#get_page(v:count)<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#pre_get_page(v:count)<CR>
nnoremap <silent> <buffer> K :call man#get_page(v:count)<CR>
endif
endif