diff options
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -433,17 +433,20 @@ function! Help(visual, iskeyword, command) let l:word = expand('<cword>') endif let &iskeyword = l:iskeyword - exe &helpheight . 'new' - set modifiable + + exe 'noswapfile ' . &helpheight . 'new ' . l:word + setlocal buftype=nofile + setlocal bufhidden=wipe + setlocal nobuflisted + + setlocal modifiable exe 'call ' . a:command . '("' . l:word . '")' normal! ggdd - set buftype=nofile - set nobuflisted - set nomodifiable + setlocal nomodifiable endfunction function! s:man(word) exe 'silent read! man -Pcat ' . a:word - set filetype=man + setlocal filetype=man endfunction nnoremap <silent>K :call Help(0, [], '<SID>man')<CR> xnoremap <silent>K :call Help(1, [], '<SID>man')<CR> |