mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-21 19:11:30 +01:00
vim: improve Man command display
This commit is contained in:
parent
10c79f1bad
commit
35575755ef
|
@ -129,13 +129,12 @@ command! -nargs=1 -complete=command -bar -range Redir silent call Redir(<q-args>
|
||||||
function! Man(cmd)
|
function! Man(cmd)
|
||||||
vnew
|
vnew
|
||||||
let w:scratch=1
|
let w:scratch=1
|
||||||
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile filetype=man
|
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile filetype=man nonumber norelativenumber
|
||||||
setlocal nonumber norelativenumber
|
let output = system('env COLUMNS=80 man ' . a:cmd)
|
||||||
let output = system('man ' . a:cmd)
|
|
||||||
call setline(1, split(output, '\n'))
|
call setline(1, split(output, '\n'))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -nargs=1 -complete=shellcmd Man silent call Man(<q-args>)
|
command! -nargs=1 -complete=shellcmd Vert Man silent call Man(<q-args>)
|
||||||
|
|
||||||
" Execute the given command and print it in a scratch buffer
|
" Execute the given command and print it in a scratch buffer
|
||||||
function! Cmd(cmd)
|
function! Cmd(cmd)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user