在vim中,我可以设置textwidth选项,然后将新文本格式化为wrap.我也可以使用"gq"命令来显式包装文本.但是,使用项目符号列表的行为对我来说有点意外.vim文档讨论了使用带有连字符的项目符号的项目符号列表.当我尝试这样做时,它开始没问题:
- This is a bulleted list item that
has been wrapped. It looks good.
Run Code Online (Sandbox Code Playgroud)
但是,如果我继续第三行,它会放弃缩进:
- This is a bulleted list item that
has been wrapped over more than
two lines. The indentation for lines
after the second is unexpected.
Run Code Online (Sandbox Code Playgroud)
这发生在:
formatoptions=tcq
comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
Run Code Online (Sandbox Code Playgroud)
为了清楚起见,我想这样缩进:
- This is a bulleted list item that
has been wrapped over more than
two lines. I want every line after
the first to get the same indent.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2473 次 |
| 最近记录: |