diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-10-29 00:14:43 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-10-29 02:01:52 -0400 |
commit | 88be99a05bc0143f62ef471ac2f6a5bd68d2f70c (patch) | |
tree | 294be4f3eece13ef7f7032af7e1b49789d9cb7c5 /vim | |
parent | 5b650317822743efb0185ccee8c77f982a28b3e7 (diff) | |
download | conf-88be99a05bc0143f62ef471ac2f6a5bd68d2f70c.tar.gz conf-88be99a05bc0143f62ef471ac2f6a5bd68d2f70c.zip |
clean up the help overrides stuff a bit
Diffstat (limited to 'vim')
-rw-r--r-- | vim/ftplugin/perl.vim | 5 | ||||
-rw-r--r-- | vim/ftplugin/python.vim | 12 | ||||
-rw-r--r-- | vim/ftplugin/ruby.vim | 6 |
3 files changed, 12 insertions, 11 deletions
diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim index 8fb8575..6edc9fb 100644 --- a/vim/ftplugin/perl.vim +++ b/vim/ftplugin/perl.vim @@ -2,10 +2,7 @@ let b:ale_linters = { 'perl': ['perlcritic'] } " look up words in perldoc rather than man for K function! s:perldoc(word) - let l:perldoc_pager = $PERLDOC_PAGER - let $PERLDOC_PAGER = 'cat' - exe 'silent read! perldoc -f "' . a:word . '" 2>/dev/null || perldoc "' . a:word . '"' - let $PERLDOC_PAGER = l:perldoc_pager + exe 'silent read! perldoc -o PlainText -f "' . a:word . '" 2>/dev/null || perldoc -o PlainText "' . a:word . '"' setlocal ft=man endfunction nnoremap <buffer> <silent>K :call Help(0, [':'], '<SID>perldoc')<CR> diff --git a/vim/ftplugin/python.vim b/vim/ftplugin/python.vim index 6973956..b317797 100644 --- a/vim/ftplugin/python.vim +++ b/vim/ftplugin/python.vim @@ -1,9 +1,13 @@ " look up words in pydoc rather than man for K function! s:pydoc(word) - let l:pydoc_pager = $MANPAGER + let l:pydoc_manpager = $MANPAGER + let l:pydoc_pager = $PAGER let $MANPAGER = 'cat' + let $PAGER = 'cat' exe 'silent read! pydoc "' . a:word . '" 2>/dev/null' - let $MANPAGER = l:pydoc_pager + let $MANPAGER = l:pydoc_manpager + let $PAGER = l:pydoc_pager + setlocal ft=man endfunction -nnoremap <buffer> <silent>K :call Help(0, [':'], '<SID>pydoc')<CR> -vnoremap <buffer> <silent>K :call Help(1, [':'], '<SID>pydoc')<CR> +nnoremap <buffer> <silent>K :call Help(0, ['.'], '<SID>pydoc')<CR> +vnoremap <buffer> <silent>K :call Help(1, ['.'], '<SID>pydoc')<CR> diff --git a/vim/ftplugin/ruby.vim b/vim/ftplugin/ruby.vim index a7c536d..e030a3d 100644 --- a/vim/ftplugin/ruby.vim +++ b/vim/ftplugin/ruby.vim @@ -18,7 +18,7 @@ endif " look up words in ri rather than man for K function! s:ri(word) - exe 'silent read! ri --no-pager "' . a:word . '" 2>/dev/null' + exe 'silent read! ri -T -f rdoc "' . a:word . '" 2>/dev/null' endfunction -nnoremap <buffer> <silent>K :call Help(0, [':'], '<SID>ri')<CR> -vnoremap <buffer> <silent>K :call Help(1, [':'], '<SID>ri')<CR> +nnoremap <buffer> <silent>K :call Help(0, [':', '.'], '<SID>ri')<CR> +vnoremap <buffer> <silent>K :call Help(1, [':', '.'], '<SID>ri')<CR> |