What is a way to read man pages in vim without using temporary files

前端 未结 11 1310
萌比男神i
萌比男神i 2020-12-12 19:36

I want to be able to read man pages in vim. For some reason, it seems that vim isn\'t able to read the output of programs through piping (i.e \'(man ls) | vi\' doesn\'t seem

11条回答
  •  萌比男神i
    2020-12-12 20:08

    I have a better solution, the one that I used, it is like this:

    /bin/sh -c "unset PAGER;col -b -x | vim -R -c 'set ft=man nomod nolist' -c 'map q :q' -c 'map  ' -c 'map b ' -c 'nmap K :Man =expand(\"\")' -"
    

    Hope you'll enjoy it.

提交回复
热议问题