请看枚举:
enum TestEnum
{
First = 1,
Second = 2,
Unknown = 3,
TestTestTest = 100,
Zero = 0,
Foo = 123,
}
如何使用Vim的全部功能重新格式化它?
enum TestEnum
{
First = 1,
Second = 2,
Unknown = 3,
TestTestTest = 100,
Zero = 0,
Foo = 123,
}
个人而言,我会逐行移动并缩进。这与我在任何常规编辑器中所做的方式相同。如何正确地执行此操作?
对于类成员也是一样的:
class Foo
{
SuperFoo foo1;
RegularFoo foo2;
SuperiorFoo foo3;
YetAnotherFoo foo4;
Bar bar;
}
转换为类似于以下内容
class Foo
{
SuperFoo foo1;
RegularFoo foo2;
SuperiorFoo foo3;
YetAnotherFoo foo4;
Bar bar;
}
谢谢
:Align =
这样简单的本地命令。 - Cascabel