修改vim自动缩进的行为

时间:2019-07-12 20:41:44

标签: vim auto-indent

总的来说,我喜欢vim的自动缩进功能。但是,有一件事让我很烦。当我在markdown中开始一个列表,并且该行到达右边距时,vim用一个项目符号标记开始了新行。

当前行为:

Here is a list:

 * The first sentence goes on and on and on and on and eventually
 * it hits the right margin. I then hit Enter:
 * And another bullet appears.

所需行为:

Here is a list:

 * The first sentence goes on and on and on and on and eventually
   it hits the right margin. I then hit Enter:
 * And another bullet appears.

我希望vim足够聪明,不要在自动换行时插入项目符号,而要添加两个空格。仅在按Enter键时插入项目符号。

这可能吗?

0 个答案:

没有答案