mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-12-05 01:01:30 +01:00
vim: add syntax highlighting to :Man command
This commit is contained in:
parent
5ca025b9fb
commit
ba82eea132
|
@ -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
|
" Gets the manul page for the given command
|
||||||
function! Man(cmd)
|
function! Man(cmd)
|
||||||
let output = system('env PAGER="bat -p" man ' . a:cmd)
|
let output = system('man ' . a:cmd)
|
||||||
vnew
|
vnew
|
||||||
let w:scratch=1
|
let w:scratch=1
|
||||||
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
|
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile filetype=man
|
||||||
setlocal nonumber norelativenumber
|
setlocal nonumber norelativenumber
|
||||||
call setline(1, split(output, '\n'))
|
call setline(1, split(output, '\n'))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in New Issue
Block a user