在nVim的的选项formatoptions设置将缩进列表项的第二行以匹配第一行的缩进。但是,第三行和后续行恢复为无缩进,因此:
1. Doing a list. This is my list. I am writing
a list. It's quite a long list. It's really
long. I can't believe how long it is. And
this just the first item!
2. Another list item.
Run Code Online (Sandbox Code Playgroud)
我真的很喜欢它缩进所有的行,像这样:
1. Doing a list. This is my list. I am writing
a list. It's quite a long list. It's really
long. I can't believe how long it is. And
this just the first item!
2. Another list item.
Run Code Online (Sandbox Code Playgroud)
使用 Vim 自己的选项、脚本或外部格式化程序(例如 par),这可能吗?
gar*_*ohn 16
我认为只需设置 'autoindent' 就可以解决这个问题。它对我有用。
set ai
Run Code Online (Sandbox Code Playgroud)
在你的情况下,我会这样做:
:set autoindent " just for interactive indenting (see answer of @Rich)
:set fo+=2n " :help fo-table
:set tw=47 " your text shall wrap at xyz
Run Code Online (Sandbox Code Playgroud)
(这tw=47对 .. 很重要)然后通过按重新格式化段落gqap
注意:我不能用=这两种方法重新定义段落,也许其他人已经发现了。
| 归档时间: |
|
| 查看次数: |
2805 次 |
| 最近记录: |