An Emacs minor-mode to automatically change the cursor
electric-cursor-mode is a global minor mode that sets up hooks to change the
cursor-type in Emacs in certain modes.
The default is to change the cursor to a block in
overwrite-mode, and a vertical bar in every other mode.
The modes and cursor types are defined in the variable
electric-cursor-alist, an alist with modes in the
car position and cursor shapes in the
For example, the default looks like this:
((overwrite-mode . box))
When you enable
electric-cursor-mode, it adds hooks to each mode in
electric-cursor-alist to set the cursor according to
The hooks are removed when you disable
You can find
electric-cursor on MELPA, so it's installable via
straight.el, or whatever. Of course, you can also clone this repository and put it somewhere Emacs will know about it. After that, just do this:
The code in this repository is licensed under the ISC license. See LICENSE for details.
Open an issue or send me an email (my email address is in electric-cursor.el's header).