Wrap long lines in Vim?

左心房为你撑大大i 提交于 2019-12-05 19:34:18

gq isn't enough to wrap the text. You have to give it a motion over which to wrap (like gqj) or tell it to wrap the current line with gqq. Are you sure you're not just mistyping it?

If you aren't, what are the formatexpr and formatprg options set to, if anything?

Update
The problem is the b setting in formatoptions. That's telling Vim to only wrap the text added during the last insertion.

I find that if I select the line before doing the gq, it works fine. Doesn't gq want to be combined with some text selection operation to work?

UPDATE

I confirm the bug. Running vim -u NONE, my formatoptions are vt.

Maybe Bram Molenar or at least the vim community would be interested?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!