https://github.com/duckwork/electric-cursor
#emacs minor-mode to automatically change the cursor
https://github.com/duckwork/electric-cursor
Last synced: about 1 year ago
JSON representation
#emacs minor-mode to automatically change the cursor
- Host: GitHub
- URL: https://github.com/duckwork/electric-cursor
- Owner: duckwork
- License: isc
- Created: 2021-04-20T21:05:57.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-01-08T20:59:03.000Z (over 4 years ago)
- Last Synced: 2025-04-13T14:11:49.996Z (about 1 year ago)
- Language: Emacs Lisp
- Size: 25.4 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# electric-cursor
## An Emacs minor-mode to automatically change the cursor
[](https://melpa.org/#/electric-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 `cdr` positions.
For example, the default looks like this:
```lisp
((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 `electric-cursor-alist`.
The hooks are removed when you disable `electric-cursor-mode`.
## Install
You can find `electric-cursor` on [MELPA](https://melpa.org/#/electric-cursor), so it's installable via `package.el`, `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:
```lisp
(electric-cursor-mode +1)
```
## License
The code in this repository is licensed under the ISC license. See LICENSE for details.
## Contributing
Open an issue or send me an email (my email address is in electric-cursor.el's header).