Why can't I stop vim from wrapping my code?

前端 未结 9 1895
陌清茗
陌清茗 2020-12-12 12:05

I can\'t stop vim from wrapping my Python code. If I enter :set nowrap like a champ, but it still wraps.

I can hit J to unite the split lines

9条回答
  •  半阙折子戏
    2020-12-12 13:08

    For preventing vim from wrapping long lines I use these two lines in my .vimrc:

    set nowrap           " do not automatically wrap on load
    set formatoptions-=t " do not automatically wrap text when typing
    

提交回复
热议问题