Ricky

链接

RSS

RSS Link
Vim color scheme for go
Vim中搜索各种资源的强大插件

Vim中带有中文字符的指定列自动换行

Ricky posted @ 2013年4月10日 10:22 in Vim , 3732 阅读

设置textwidth为指定列宽: set tw=72

设置中文formatoptions: set fo+=Mm

替换命令:

:%s/\(\%73c.\)/\r\1/g

这样就会自动在72列后换行了

 

全英文的就很简单了,进入visual模式后gq就可以了

Avatar_small
依云 说:
2013年4月10日 20:00

formatoptions=croqn2mB1
中文和英文一样对待。

Avatar_small
Ricky 说:
2013年4月15日 14:54

真的可以,多谢了

Avatar_small
Chennai Escorts 说:
2021年11月23日 12:51

It is one of the most attractive and great places where people will like to visit it several times.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter