junegunn / vim-easy-align

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

add support for regex lookbehind #133

Closed edwmurph closed 4 years ago

edwmurph commented 4 years ago

could support be added to align based on regex with lookbehind?

e.g. selecting this text in visual mode

kabc
abc
bcd

then pressing C-x and entering the following regex

Regular Expression: (?<=a)bc

doesn't currently work. i verified entering the simpler regular expression bc aligns the above text as expected and that the regex syntax im using for lookbehind is valid.

edwmurph commented 4 years ago

had a revelation immediately after creating this issue that this library probably just uses vim's search for regex which has different syntax for look behind so for others who encounter this issue, the vim search syntax for lookbehind works here:

\(a\)\@<=bc