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

2019-01-21 04:47发布

I know there must be something obvious I'm missing, but I can't stop vim from wrapping my python code. I enter :set nowrap like a champ, but still it wraps. I can hit J to unite the split lines of code, so it seems like a real carriage return is being inserted, I just don't understand why or how to stop it.

标签: vim wrapping
8条回答
forever°为你锁心
2楼-- · 2019-01-21 05:12

To disable line wrap, you can enter :set wrap! or append this command to your ~/.vimrc.

查看更多
乱世女痞
3楼-- · 2019-01-21 05:17

set formatoptions-=t should do the trick. set formatoptions+=t will turn auto-wrapping back on.

查看更多
登录 后发表回答