Vim textwidth逗号缩进问题 [英] Vim textwidth comma indent problem

查看:92
本文介绍了Vim textwidth逗号缩进问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在Vim中设置以下选项,

If i set the following option in Vim,

set textwidth=80

该文本将以80个字符结尾.这行得通,但是问题是,如果逗号(,)位于行尾,Vim会将下一行缩进.我该怎么做才能避免这种行为?

the text will break at 80 characters. This works, but the problem is if a comma (,) is on the end of a line, Vim indents the next line. What can I do to avoid this behaviour?

推荐答案

您可能使用了C风格缩进. :set nocindent应该可以解决问题

You probably have C style indenting on. :set nocindent should do the trick

这篇关于Vim textwidth逗号缩进问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆