Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近和一个朋友结对编程,我真的很喜欢他在 emacs 中的工作流程:
有什么办法可以在 vim 中做到这一点?我知道您可以使用=运算符,但问题是只执行自动缩进而不是格式化。
=
您可以使用gq运算符进行自动格式化,但我不能说结果会有多好:此函数主要用于格式化文本:在注释或 HTML/TeX 文件中。
gq
可以使用'formatexpr'或调整行为'formatprg',如果您知道好的格式化程序,可以使用后者。
'formatexpr'
'formatprg'