vim: add syntax highlighting to :Man command

feature/improve-speed
bretello 2021-03-08 10:00:57 +01:00
parent f5f70bfc07
commit f19e9ea485
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 2 additions and 2 deletions

View File

@ -126,10 +126,10 @@ command! -nargs=1 -complete=command -bar -range Redir silent call Redir(<q-args>
" Gets the manul page for the given command
function! Man(cmd)
let output = system('env PAGER="bat -p" man ' . a:cmd)
let output = system('man ' . a:cmd)
vnew
let w:scratch=1
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile filetype=man
setlocal nonumber norelativenumber
call setline(1, split(output, '\n'))
endfunction