mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 00:48:35 +00:00
improved documentation on key bindings overwrites
This commit is contained in:
parent
6249491484
commit
7c11800250
1 changed files with 16 additions and 2 deletions
|
|
@ -4,8 +4,20 @@ The default keys are based on arrow keys to navigate.
|
|||
|
||||
However popular demand lead to fully customizability of the key bindings.
|
||||
|
||||
On first start `gitui` will create `key_bindings.ron` file automatically based on the defaults.
|
||||
This file allows changing every key binding.
|
||||
Create a `key_bindings.ron` file like this:
|
||||
```
|
||||
(
|
||||
focus_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
|
||||
focus_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
|
||||
focus_above: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
|
||||
focus_below: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
|
||||
|
||||
move_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
|
||||
move_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
|
||||
move_up: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
|
||||
move_down: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
|
||||
)
|
||||
```
|
||||
|
||||
The config file format based on the [Ron file format](https://github.com/ron-rs/ron).
|
||||
The location of the file depends on your OS:
|
||||
|
|
@ -14,6 +26,8 @@ The location of the file depends on your OS:
|
|||
* `$HOME/.config/gitui/key_bindings.ron` (linux)
|
||||
* `%APPDATA%/gitui/key_bindings.ron` (Windows)
|
||||
|
||||
See all possible keys to overwrite in code: [here](https://github.com/extrawurst/gitui/blob/master/src/keys/key_list.rs#L83)
|
||||
|
||||
Here is a [vim style key config](vim_style_key_config.ron) with `h`, `j`, `k`, `l` to navigate. Use it to copy the content into `key_bindings.ron` to get vim style key bindings.
|
||||
|
||||
# Key Symbols
|
||||
|
|
|
|||
Loading…
Reference in a new issue