vi: Line too long

前端 未结 2 1956
醉话见心
醉话见心 2021-01-18 05:18

When I use vi to analyze log files, it sometimes is stuck with the error: \'Line too long\'. I can watch the file using more, but that\'s not what I want.

2条回答
  •  灰色年华
    2021-01-18 06:06

    Find out the limit supported, then use fold

    fold -80 your_file | more
    

    Or

    fold -80 your_file > /tmp/your_file.0
    vim /tmp/your_file.0
    

提交回复
热议问题