⚙️ Editing Workbench
z-shell/zsh-editing-workbench
Organized shortcuts for various command line editing operations, plus new operations as incremental history word completion.
| Keys | Description |
|---|---|
| Alt+w | Delete a shell word 1 |
| Alt+t | Transpose (swap) shell words |
| Alt+m | Copy previous shell word, or word before that, etc. when used multiple times |
| Alt+M | Just copy previous shell word without iterating to previous ones |
| Alt+. | Copy last shell word from previous line, or line before that, etc. when used multiple times; can be combined with Alt+m |
| Ctrl+W | Delete word according to configured word style 2: |
| Alt+r | Transpose (swap) words according to configured word style (cursor needs to be placed on beginning of word to swap) |
| Alt+/ | Complete some word 3 from history |
| Alt+h, Alt+H | Complete shell word from history (custom version) |
| Alt+J | Break line |
| Alt+_ | Undo |
Install Zsh Editing Workbench
- Zi
- Zgen
- Standalone
Add the following to .zshrc. The config files will be available in ~/.config/zew.
~/.zshrc
zi load z-shell/zsh-editing-workbench
Add zgen load z-shell/zsh-editing-workbench to .zshrc and issue a zgen reset (this assumes that there is a proper zgen save construct in .zshrc). The config files will be available in ~/.config/zew.
After extracting ZEW to {some-directory} add the following two lines to ~/.zshrc:
~/.zshrc
fpath+=( {some-directory} )
source "{some-directory}/zsh-editing-workbench.plugin.zsh"
Configure terminals
- XTerm
To make Alt key work like expected under XTerm add XTerm*metaSendsEscape: true to your resource file, e.g.:
echo 'XTerm*metaSendsEscape: true' >> ~/.Xresources
- Konsole
To make Alt key work like expected under Konsole add Konsole*keysym.Meta: Meta to your resource file, e.g.:
echo 'Konsole*keysym.Meta: Meta' >> ~/.config/konsolerc