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

前端 未结 11 1302
萌比男神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条回答
  •  独厮守ぢ
    2020-12-12 20:13

    Your example code is wrong.

       tempo=`mktemp`
       man $1 > $tempo; vi $tempo
    

    But you really only need

       man $1 | vi -
    

提交回复
热议问题