In VIM, how do I break one really long line into multiple lines?

前端 未结 11 551
刺人心
刺人心 2021-01-29 17:53

Say I have a super long line in the VIM editor (say around 300+ characters). How would I break that up into multiple lines so that the word boundaries roughly break at 80 chara

11条回答
  •  北海茫月
    2021-01-29 18:00

    First set your vim so that it understands that you want 80 characters:

    :set tw=80
    

    then, hilight the line:

    V
    

    and make vim reformat it:

    gq
    

提交回复
热议问题