首页 > 解决方案 > 修改 vim 自动缩进的行为

问题描述

总的来说,我喜欢 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 时才插入子弹。

这可能吗?

标签: vimauto-indent

解决方案


推荐阅读