junegunn / vim-easy-align

:sunflower: A Vim alignment plugin
4.12k stars 120 forks source link

Issues Aligning Second Colons #132

Closed TerryChau closed 4 years ago

TerryChau commented 4 years ago

EasyAlign works great with equal signs but I cannot seem to get the colons to align in the same manner.

Using :'<,'>EasyAlign*=al, I get:


za = fold toggle = toggles between a fold being opened and closed (zA does it recursively)
zc = fold close  = close 1 fold under the cursor (zC does it recursively)
zo = fold open   = open 1 fold under the cursor (zO does it recursively)
zm = fold more   = increases foldlevel by 1 (zM opens all folds)
zr = fold reduce = decreses foldlevel by 1 (zR closes all folds)

However, :'<,'>EasyAlign*:al produces:


za: fold toggle: toggles between a fold being opened and closed (zA does it recursively)
zc: fold close:  close 1 fold under the cursor (zC does it recursively)
zo: fold open:   open 1 fold under the cursor (zO does it recursively)
zm: fold more:   increases foldlevel by 1 (zM opens all folds)
zr: fold reduce: decreses foldlevel by 1 (zR closes all folds)

The second column of colons are not aligned. Switching to the ga mapping does not help. I tried a bunch of other combinations, including with the number 2 instead of a *, but I still can't get it to work.

junegunn commented 4 years ago
:'<,'>EasyAlign*:>l1

Another way is to regular expression instead of using the predefined rule for : key, so we don't have to override its defaults.

:'<,'>EasyAlign*/:/