devil icon indicating copy to clipboard operation
devil copied to clipboard

Feature request: Change cursor color when the devil key sequences are in repeatable mode

Open riz-ahmed opened this issue 2 years ago • 3 comments

Some key sequences in devil mode are repeatable such as ,ppp will result in C-p C-p C-p (moving down three lines). Can there be a way to indicate visually (a change in cursor color to some bright color would be rather cool) how long the devil key sequences are in repeatable mode.

This avoids the confusion if someone looses the track if they are still in repeatable mode or not. I actually tend to continue pressing p p p without realising that the repeat mode is already deactivated and tend to insert unseen bugs in my code.

Thank you!

riz-ahmed avatar Oct 30 '23 21:10 riz-ahmed

I recently started using devil-mode and having a visual indicator, when it is possible to repeat some keys was something I really missed. So I made a quick draft, how this could be achieved: https://github.com/susam/devil/compare/main...fbrosda:devil:highlight-repeatable

Before setting up a pull request I would like to have some feedback if this approach would be fine in general and how much should be customizable by the user?

fbrosda avatar Nov 02 '24 18:11 fbrosda

Hi, thanks for implementing this. Give a decent visual indication when devil mode is active. One improvement that I would suggest is to put back the mode line Color back to the default so that it doesn't mess up with colorscheme

riz-ahmed avatar Nov 04 '24 16:11 riz-ahmed

Thanks for the feedback. The version in the pull request now remembers the original colors and restores these. Note, the feature is disabled by default and you need to set devil-highlight-repeatable to t to activate it. Happy to incorporate further feedback, if there is any.

fbrosda avatar Nov 08 '24 17:11 fbrosda