gabesoft / evil-mc

Multiple cursors implementation for evil-mode
MIT License
383 stars 35 forks source link

Indicate when the cursors are paused #62

Open duianto opened 7 years ago

duianto commented 7 years ago

Description

It would be helpful, if it was easier to see when the cursors are paused. The current method seems to be, that one moves the cursor, and checks if the other cursors also move.

Multiple cursor(s) appearance

A more user-friendly solution, could be to change the appearance of the multiple cursors when they are paused. Then their current state would be visible near the main cursor.

A possible "paused" cursor shape could be the hollow cursor-type.

But this solution leaves at least two cases where it still would be difficult to see the paused/resumed state.

Additional mode-line text

Another or an additional option could be to change the mode-line text. Here are some examples: emc:p:3, emc:P:3, emc(p):3, emc(P):3, emc:paused:3, emc:PAUSED:3, emc(paused):3, emc(PAUSED):3, (emc:3), {emc:3}, [emc:3], \<emc:3>

Inverted mode-line colors

The mode-line texts colors could (also) be inverted:

    (if evil-mc-frozen
        (propertize "%s:%d" 'face '(:inverse-video t))
      "%s:%d")

If a specific color is picked then it might run into issues with some themes.

Currently (when this was written) the mode-line text uses the cursors current color as the background (there's an open issue about it here: Modeline indicator, background color, readability #57). If that's changed so that the mode-line text uses the default colors. Then the default and the inverted (paused) mode-line text colors would look like this (with the Spacemacs-dark theme):

paused-cursors_mode-line-text-inverted

Minibuffer messages

Maybe it would be useful to show a message in the minibuffer, when the cursors are paused and resumed. The messages could say something like this:

evil-mc Cursors Paused evil-mc Cursors Resumed

Variable(s)

Variables for the options above, would make it easier to (en/dis)abled them.

gabesoft commented 7 years ago

Great suggestion

gabesoft commented 7 years ago

I added a mode-line indicator for paused state in this commit fdeb7dc992234b6f52ff43c98d02761d7a671208. This may be enough for now but I'll look into changing the cursors face as well at some point.