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.
我最近阅读了有关在 Vim 中缩进源文件的文章。但是,我希望能够自定义缩进其中的一些。当我按下 = 时,有没有办法指定运行哪个二进制文件?
从帮助:
={motion} 通过外部程序过滤 {motion} 行 用 'equalprg' 选项给出。当'equalprg' 选项为空(这是默认设置),使用 内部格式化函数|C-缩进|。但当 'indentexpr' 不为空,它将被使用 |缩进表达式|。
看起来设置equalprg选项是您想要的。
equalprg
您可以设置equalprg- 选项。(请参阅 :he = 了解更多信息)。