spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

tracking issue: replace volatile-highlight by evil-goggles

Open lebensterben opened this issue 3 years ago • 11 comments

As pointed out here, vhs is too old and not implemented in a clean way.

I propose to replace it by evil-goggles.

lebensterben avatar Apr 01 '22 20:04 lebensterben

feel free to make a PR if anyone is interested in it. this should be fairly straightforward and easy.

lebensterben avatar Apr 01 '22 20:04 lebensterben

Just to make sure we have enough info here: evil-goggles comes with Spacemacs already, but it is not turned on by default. All you need to do is set vim-style-visual-feedback t

thanhvg avatar Apr 02 '22 15:04 thanhvg

@thanhvg It should not be placed inside vim layer in my opinion. It should be turned on for all evil user by default.

lebensterben avatar Apr 02 '22 15:04 lebensterben

I just discovered that volatile-highlights caused many problems for me.

I got fed up with 'd d' bound to evil-delete taking minimum 3 seconds, that I took a closer look. It turned out to be volatile-highlights! After I disable it, 'd d' is now as fast as kill-line.

Also I could not figure out for years why removing thousands of lines from shell buffer hosed emacs. It also turned out to be volatile-highlights! For years I had to limit myself to removing only about a thousand lines or so to avoid this problem. If I forgot this and tried to remove many thousands of lines in shell buffer, then emacs would hose. Repeated Control-G may or may not wake up emacs! This is the reason why I looked for and learned about "pkill -USR2 emacs" to wake up emacs. I did not have to know such hack during my first 30 years of emacs use. It is only after using spacemacs that I managed to hose emacs like this.

This is just one of many "features" that spacemacs enable by default that makes emacs unusable running on linux servers with NFS disks. I also have to disable projectile mode completely to prevent emacs from hosing. Another way to hose emacs is to type "/u/" within shell buffer to make emacs go to sleep for 10 seconds or more. This is because it tries to complete all the names under /u/ directory which has tens of thousands of entries!

emacs18 avatar Aug 11 '22 16:08 emacs18

If I submit a PR which removes volatile-highlights, would that be accepted? I don't know anything about the alternatives such as evil-goggles mentioned above.

emacs18 avatar Aug 11 '22 16:08 emacs18

@emacs18

https://github.com/edkolev/evil-goggles

evil-goggles requires minimal setup. Since I plan to add it, I suggest to try it out to see whether it also has performance issue on your device.

lebensterben avatar Aug 11 '22 17:08 lebensterben

I set vim-style-visual-feedback to t, restarted emacs, and verified that evil-goggles-mode was t. I removed lines via d d as well as over 100 thousand lines in my shell buffer. All seemed well.

emacs18 avatar Aug 13 '22 20:08 emacs18

@emacs18

Great to hear that. You can go ahead and submit to PR to remove volatile-highlight.

(Optionally you can replace it by evil-goggles. If you didn't I will add it later.)

lebensterben avatar Aug 13 '22 20:08 lebensterben

Removing volatile-highlight is easy. I don't know what you mean by replacing it with evil-goggles. evil-goggles is already a user option via vim-style-visual-feedback. If you mean to replacing with evil-goggles that vim-style-visual-feedback should be set to t, then I'm not sure that is wise.

emacs18 avatar Aug 13 '22 20:08 emacs18

@emacs18

volatile-highlight is enabled for are users while evil-goggles is disabled by default and only works for evil users.

By "replacing volatile-highlight by evil-goggles" I mean:

  • Make evil-goggles default for evil users
  • Try to achieve feature parity, which is mainly undo-tree commands that we configured for volatille-highlight but it's not supported by evil-googles. This seems to be easily doable by modifying https://github.com/edkolev/evil-goggles/blob/8f20a16e74016f37ad76dc4f2230d9b00c6df3c2/evil-goggles.el#L572 and defining some faces.

lebensterben avatar Aug 13 '22 21:08 lebensterben

Sorry. I don't understand. This is an area I don't know much about.

emacs18 avatar Aug 14 '22 02:08 emacs18

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] avatar Aug 14 '23 16:08 github-actions[bot]