gabesoft / evil-mc

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

Fake bar cursors #37

Closed Dickby closed 7 years ago

Dickby commented 7 years ago

I more or less copied the changes in magnars multiple-cursors for this.

It introduces a function evil-mc-cursor-is-bar which is just copied from magnars mc.

Further it introduces a face evil-mc-cursor-bar-face, that uses the background color of evil-insert-state-cursor (this might be not optimal, but i guess most evil-mode users use the bar cursor for insert state).

the functions evil-mc-cursor-overlay-at-eol and evil-mc-cursor-overlay-inline are checking if the cursor is a bar and if so, they use the evil-mc-cursor-bar-face.

There is probably a better way to deside the background color of the new face (or without defining a new face) like your code does for the background color of the regular cursors, but my elisp knowledge is not that great, and this is working so far.