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

前端 未结 9 1880
陌清茗
陌清茗 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:05

    None of the other answers worked for me (IDK why).

    :set wrap! Did the trick for me (using GVim for Windows).

    0 讨论(0)
  • 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
    
    0 讨论(0)
  • 2020-12-12 13:09

    Vim may have to be in vi-compatible mode.

    0 讨论(0)
提交回复
热议问题