Skip to content

Commit

Permalink
docs(config): adds vim docs for atuinsh/atuin#1553 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
YummyOreo authored Jan 16, 2024
1 parent de04ceb commit 550ff97
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/content/docs/configuration/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ This technically defaults to true for new users, but false for existing. We
have set `enter_accept = true` in the default config file. This is likely to
change to be the default for everyone in a later release.

## vim
Default: false

When set to true, there will be two "modes:" Normal and Insert. In normal,
you may use 'k' and 'j' to navigate the list like in vim. Pressing 'i' whilst
in Normal mode will change it to Insert mode, allowing you to search. Pressing
Esc will exit Insert mode. Add `vim = true` to your config to enable this feature.

## Stats
This section of client config is specifically for configuring Atuin stats calculations

Expand Down
11 changes: 10 additions & 1 deletion src/content/docs/configuration/key-binding.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ filter_mode_shell_up_key_binding = "directory" # or global, host, directory, etc

## Disable up arrow

Our default up-arrow binding can be a bit contentious. Some people love it, some people hate it. Many people who found it a bit jarring at first have since come to love it, so give it a try!
Our default up-arrow binding can be a bit contentious. Some people love it, some people hate it. Many people who found it a bit jarring at first have since come to love it, so give it a try!

It becomes much more powerful if you consider binding a different filter mode to the up arrow. For example, on "up" Atuin can default to searching all history for the current directory only, while ctrl-r searches history globally. See the [config](https://atuin.sh/docs/config/#filter_mode_shell_up_key_binding) for more.

Expand Down Expand Up @@ -159,3 +159,12 @@ $env.config = (
|| Select the next item on the list |


### Vim mode
If [vim is enabled in the config](https://docs.atuin.sh/configuration/config/#vim), the following keybindings are enabled:

| Shortcut | Mode | Action |
| -------- | ------ | ------------------------------------- |
| k | Normal | Selects the next item on the list |
| j | Normal | Selects the previous item on the list |
| i | Normal | Enters insert mode |
| Esc | Insert | Enters normal mode |

0 comments on commit 550ff97

Please sign in to comment.