summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim-uvarov@users.noreply.github.com>2023-04-18 04:24:25 +0800
committerGitHub <noreply@github.com>2023-04-17 21:24:25 +0100
commit7cc893d67d09cb5ce076299e894baf9d97cfe4d7 (patch)
treef42fe40057b52df62d7086b794945cf9a2f0b169
parentc7d89c1703c6dc580b2ef2cbb66b0df0b1e72b50 (diff)
Add keyboard shortcuts to the Config/Keybinding chapter. (#875)
* Added Shortcuts section to keybinings * Removed obvious shortcuts * Update docs/docs/config/key-binding.md Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com> * Update docs/docs/config/key-binding.md Co-authored-by: Conrad Ludgate <oon@conradludgate.com> * replaced cursor keys with emojis * got back to utf symbols --------- Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com> Co-authored-by: Conrad Ludgate <oon@conradludgate.com>
-rw-r--r--docs/docs/config/key-binding.md34
1 files changed, 31 insertions, 3 deletions
diff --git a/docs/docs/config/key-binding.md b/docs/docs/config/key-binding.md
index ecd9267f..3db4ab02 100644
--- a/docs/docs/config/key-binding.md
+++ b/docs/docs/config/key-binding.md
@@ -1,5 +1,7 @@
# Key binding
+## Shell
+
By default, Atuin will rebind both <kbd>Ctrl-r</kbd> and the up arrow.
You can also disable either the up-arrow or <kbd>Ctrl-r</kbd> bindings individually, by passing
@@ -28,7 +30,7 @@ eval "$(atuin init zsh)"
You can then choose to bind Atuin if needed, do this after the call to init.
-# zsh
+### zsh
Atuin defines the ZLE widget "\_atuin_search_widget"
@@ -43,7 +45,7 @@ bindkey '^[[A' _atuin_search_widget
bindkey '^[OA' _atuin_search_widget
```
-# bash
+### bash
```
export ATUIN_NOBIND="true"
@@ -53,7 +55,7 @@ eval "$(atuin init bash)"
bind -x '"\C-r": __atuin_history'
```
-# fish
+### fish
```
set -gx ATUIN_NOBIND "true"
@@ -63,3 +65,29 @@ atuin init fish | source
bind \cr _atuin_search
bind -M insert \cr _atuin_search
```
+
+## Atuin UI shortcuts
+
+| Shortcut | Action |
+| ----------------------------------------- | ----------------------------------------------------------------------------- |
+| ctrl + r | Cycle through filter modes |
+| ctrl + s | Cycle through search modes |
+| alt + 1 to alt + 9 | Select item by the number located near it |
+| ctrl + c / ctrl + d / ctrl + g / esc | Return original |
+| ctrl + ⬅︎ / alt + b | Move the cursor to the previous word |
+| ctrl + ➡️ / alt + f | Move the cursor to the next word |
+| ctrl + h / ctrl + b / ⬅︎ | Move the cursor to the left |
+| ctrl + l / ctrl + f / ➡️ | Move the cursor to the right |
+| ctrl + a / home | Move the cursor to the start of the line |
+| ctrl + e / end | Move the cursor to the end of the line |
+| ctrl + backspace / ctrl + alt + backspace | Remove the previous word / remove the word just before the cursor |
+| ctrl + delete / ctrl + alt + delete | Remove the next word or the word just after the cursor |
+| ctrl + w | Remove the word before the cursor even if it spans across the word boundaries |
+| ctrl + u | Clear the current line |
+| ctrl + n / ctrl + j / ⬆ | Select the next item on the list |
+| ctrl + p / ctrl + k / ⬇ | Select the previous item on the list |
+| page down | Scroll search results one page down |
+| page up | Scroll search results one page up |
+| enter | Select highlighted item |
+| ⬇ (with no entry selected) | Return original or return query depending on settings |
+| ⬇ | Select the next item on the list |