Closed ogdenwebb closed 7 years ago
This seems like a nice addition. I see these possible options for configuration:
evil-lion-mimic-align-regex
; as a result:
align-regexp
does)"
in this case) will be exactly one (again, this is what align-regexp
does)BTW align-regexp
with "repeat ON" will result in one extra space before the second occurrence:
(teal-green "#6fb593 ")
(wheat "#b9c791 ")
(dark-blue "#2a4661 ")
(blue "#5485b6 ")
(alt-blue "#6666be ")
(cyan "#54b6b6 ")
I don't really like evil-lion-mimic-align-regex
. A better option would be to just call interactively align-regexp
instead of trying to mimic it (gl
would be like an alias of align-regexp
).
evil-lion-squeeze-spaces
, inspired by vim-lion's g:lion_squeeze_spaces
https://github.com/tommcdo/vim-lion#optionsAs a result, If this evil-lion-sqeeze-spaces
is t
, evil-lion will cleanup extra spaces right in front of CHAR (but it will not add spaces if there weren't any to begin with).
I'll think some more. Either way, I would like to extend evil-lion to be able to do this, I just have to figure out a good way to do it.
I just pushed this commit https://github.com/edkolev/evil-lion/commit/6885d51d8124ce2f6d2a0137659911b3c7d27c8b which adds the following option:
(setq evil-lion-squeeze-spaces t) ;; default is nil
With this set to t
, the desired behaviour will be achieved.
I'll use it for some time, then make it the default.
@edkolev yes, works fine for me. Thanks for this change. If you want, the issue can be closed.
I've made this the default behaviour, starting with https://github.com/edkolev/evil-lion/commit/dd732c1471ecc9f6d964b214b7b6a5ac9f08178e
To disable removal of spaces:
(setq evil-lion-squeeze-spaces nil) ;; default is t
Cheers.
Evil-lion-left
and built-inalign-regexp
have the different rules to align the strings. With evil-lion it looks like you align a piece of code to a new string(fourth string) instead of align a new string to the existing piece of code.For example:
In my opinion, the
align-regexp
way is more natural. Would you like to add an option to set alignment rules? Or maybe change the current behavior?