https://github.com/knu/zsh-delsel-mode
delsel-mode (delete-selection-mode) for zsh
https://github.com/knu/zsh-delsel-mode
Last synced: 4 months ago
JSON representation
delsel-mode (delete-selection-mode) for zsh
- Host: GitHub
- URL: https://github.com/knu/zsh-delsel-mode
- Owner: knu
- License: bsd-2-clause
- Created: 2019-05-31T08:12:04.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-11T09:27:17.000Z (almost 2 years ago)
- Last Synced: 2025-07-20T21:40:22.295Z (11 months ago)
- Language: Shell
- Homepage:
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
delsel-mode for zsh
===================
Synopsis
--------
* delsel-mode - zle tweak to delete an active region just by hitting a key
Description
-----------
This mode makes an active region work much like a text selection in
typical GUI. You can delete the selected text just by hitting a
delete key, or overwrite it by typing text or yanking.
How to set up
-------------
Put the file `delsel-mode` somewhere in your `$fpath` and add these
lines to your `.zshrc`:
```shell
autoload -Uz delsel-mode
delsel-mode
```
If you are enabling `url-quote-magic`, make sure to load it first and
then load `delsel-mode`.
Configuration
-------------
By default, an active region is deleted or replaced by invoking the
following commands:
- `self-insert`
- `delete-char`
- `backward-delete-char`
- `yank`
To add more commands, call `delsel-mode.wrap-command` like so:
```shell
delsel-mode.wrap-command your-insert-command
delsel-mode.wrap-command your-delete-command
```
License
-------
Copyright (c) 2019 Akinori MUSHA
Licensed under the 2-clause BSD license.
See `LICENSE` for details.