my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.5 KiB

3 years ago
  1. # Colemak plugin
  2. This plugin remaps keys in `zsh`'s [`vi`-style navigation mode](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Keymaps)
  3. for a [Colemak](https://colemak.com/) keyboard layout, to match the QWERTY position:
  4. ![Colemak layout on a US keyboard](https://colemak.com/wiki/images/6/6c/Colemak2.png)
  5. To use it, add it to the plugins array in your `~/.zshrc` file:
  6. ```
  7. plugins=(... colemak)
  8. ```
  9. You will also need to enable `vi` mode, so add another line to `~/.zshrc`:
  10. ```
  11. bindkey -v
  12. ```
  13. Restart your shell and hit the `<ESC>` key to activate `vicmd` (navigation) mode,
  14. and start navigating `zsh` with your new keybindings!
  15. ## Key bindings for vicmd
  16. | Old | New | Binding | Description |
  17. |------------|------------|---------------------------|----------------------------------------------------|
  18. | `CTRL`+`j` | `CTRL`+`n` | accept-line | Insert new line |
  19. | `j` | `n` | down-line-or-history | Move one line down or command history forwards |
  20. | `k` | `e` | up-line-or-history | Move one line up or command history backwards |
  21. | `l` | `i` | vi-forward-char | Move one character to the right |
  22. | `n` | `k` | vi-repeat-search | Repeat command search forwards |
  23. | `N` | `K` | vi-rev-repeat-search | Repeat command search backwards |
  24. | `i` | `u` | vi-insert | Enter insert mode |
  25. | `I` | `U` | vi-insert-bol | Move to first non-blank char and enter insert mode |
  26. | `<none>` | `l` | vi-undo-change | Undo change |
  27. | `J` | `N` | vi-join | Join the current line with the next one |
  28. | `e` | `j` | vi-forward-word-end | Move to the end of the next word |
  29. | `E` | `J` | vi-forward-blank-word-end | Move to end of the current or next word |
  30. ## Key bindings for less
  31. | Keyboard shortcut | `less` key binding |
  32. |-------------------|--------------------|
  33. | `n` | forw-line |
  34. | `e` | back-line |
  35. | `k` | repeat-search |
  36. | `ESC`+`k` | repeat-search-all |
  37. | `K` | reverse-search |
  38. | `ESC`+`K` | reverse-search-all |