There is room for much improvement...
1. selecting the region:
a combination of backward-up-list and mark-sexp will select the surrounding structure (repeating will extend the selection till statement (ie. ';') boundary.
(please note that cperl-mode injects here some semantic knowledge about the code's structure which can't be reflected in a simple regexp rule)
2. the rule for align-current has the advantage to harmonize the surrounding whitespaces too. And align-regexp seems to allow the same extended logic.
So combining both steps bound to a key should make alignment of fat-commas quite easy.
I experimented with a kmacro and it seemed quite nice. :)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re^2: prettyfy hashes
by LanX
in thread prettyfy hashes
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |