abougouffa / minemacs

MinEmacs: an Emacs configuration framework for daily use
https://abougouffa.github.io/minemacs/
MIT License
143 stars 16 forks source link

evil-mode '>' evil-shift-left loses selection #77

Closed donneyluck closed 1 year ago

donneyluck commented 1 year ago

hi @abougouffa when i move code use evil
This operation is incoherent
May need to be optimized I didn't submit a pr because I think you can make them better combined thks https://superuser.com/questions/684540/evil-mode-evil-shift-left-loses-selection

abougouffa commented 1 year ago

Thank you for suggestion @donneyluck,

I really want to have this behavior, however, when I tried the code above, I got a weird behavior on right shift:

Peek 2023-06-15 15-40

Update

The behavior depicted above is also present in evi-shift-left. Maybe I need to report this upstream.

abougouffa commented 1 year ago

After all, I think sticking with the defaults might be better, see this answer:

https://www.reddit.com/r/emacs/comments/t8zmx1/comment/hzthnb2

donneyluck commented 1 year ago

After all, I think sticking with the defaults might be better, see this answer:

https://www.reddit.com/r/emacs/comments/t8zmx1/comment/hzthnb2

  1. You can restore the selection by pressing gv after indenting to get the selection back.

  2. If you wanted to re-indent the selection press . (no need to re-select).

Option 1 works but is cumbersome

Option 2 got an error evil-repeat not work

donneyluck commented 1 year ago

got a weird behavior on right shift

I guess this problem may be caused by some hooks that automatically format buffers

abougouffa commented 1 year ago

The weird right shift behavior in Lisp modes was caused by parinfer-rust-mode, the commit a46a79f039d215d84f6fad17ba52159406ab0feb should fix this!

However, pressing "." do repeat the last command!