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 正确对齐?如果我有一个嵌套了多个条件的函数,事情就会开始变得很糟糕。vim 能拯救世界吗?
当然。只需选择相关的代码块并按=。
还有一个很好的 Vim 插件,叫做endwise,它会自动为你插入结尾。
gg=G
(转到顶部,一直重新缩进到底部)