开发者

vim how to comma align

开发者 https://www.devze.com 2022-12-23 02:16 出处:网络
I have a bunch of code of the form: someVector.push_back(Foo(\"some name\", 1.0, 3.1415926); someVector.push_back(Foo(\"different length name\", 89.0, 2.717);

I have a bunch of code of the form:

someVector.push_back(Foo("some name", 1.0, 3.1415926);
someVector.push_back(Foo("different length name", 89.0, 2.717);
... 20 more entries

I want sufficient space to be inserted so that my code is comma aligned, i.e. the "1.0," 's comma and the "89.0"'s comma are aligned -- is开发者_Python百科 there builtins to do this?


Use Vim's Align plugin. It does exactly that.


With the Align plugin it's just simple: select the lines in visual mode and type \t,

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号