You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble with the following example. I'm not sure if there's a feature that I'm missing.
Say I have this text
auto Foo() -> void;
auto Bar(const char *str) const -> void;
auto Baz(unsigned val) const -> void;
auto Qux() const -> int;
auto FooBar(unsigned val, unsigned num) -> void;
And I want it to align it on -> and const:
auto Foo() -> void;
auto Bar(const char *str) const -> void;
auto Baz(unsigned val) const -> void;
auto Qux() const -> int;
auto FooBar(unsigned val, unsigned num) -> void;
The closest I've gotten is :EasyAlign /\(const ->\|->\)/:
auto Foo() -> void;
auto Bar(const char *str) const -> void;
auto Baz(unsigned val) const -> void;
auto Qux() const -> int;
auto FooBar(unsigned val, unsigned num) -> void;
But I don't want the whitespace before the -> on the last line.
Or If I align on the consts I get:
auto Foo() -> void;
auto Bar(const char *str) const -> void;
auto Baz(unsigned val) const -> void;
auto Qux() const -> int;
auto FooBar(unsigned val, unsigned num) -> void;
and then align again on ->
auto Foo() -> void;
auto Bar(const char *str) const -> void;
auto Baz(unsigned val) const -> void;
auto Qux() const -> int;
auto FooBar(unsigned val, unsigned num) -> void;
In the last example, if I right align on const and keep the whitespace, then that solves my problem, but I'm not quite sure how to get there. Any suggestions?
The text was updated successfully, but these errors were encountered:
I don't think easy-align supports the behavior you're trying to achieve. You'll have to preprocess or postprocess the output using :s command (e.g. :'<,'>s/ const\( *\)->/\1const ->/) or some vimscript.
I'm having trouble with the following example. I'm not sure if there's a feature that I'm missing.
Say I have this text
And I want it to align it on
->
andconst
:The closest I've gotten is
:EasyAlign /\(const ->\|->\)/
:But I don't want the whitespace before the
->
on the last line.Or If I align on the
const
s I get:and then align again on
->
In the last example, if I right align on
const
and keep the whitespace, then that solves my problem, but I'm not quite sure how to get there. Any suggestions?The text was updated successfully, but these errors were encountered: