-
-
Notifications
You must be signed in to change notification settings - Fork 568
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* customizable key config * provide example vim key config * automatically show correct key binding in bottom cmd-bar
- Loading branch information
Showing
30 changed files
with
1,643 additions
and
921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.DS_Store | ||
/.idea/ | ||
flamegraph.svg | ||
KEY_CONFIG.md |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Key Config | ||
|
||
Default using arrow key to navigate the gitui and Ctrl + C to quit the program | ||
|
||
The first time Gitui will create `key_config.ron` file automatically. | ||
You can change the every single key bindings of the program as what you like. | ||
|
||
The config file format is [Ron format](https://github.com/ron-rs/ron). | ||
And the path differs depending on the operating system: | ||
* `$HOME/Library/Preferences/gitui/key_config.ron` (mac) | ||
* `$XDG_CONFIG_HOME/gitui/key_config.ron` (linux using XDG) | ||
* `$HOME/.config/gitui/key_config.ron` (linux) | ||
|
||
Here is a [vim style key config](assets/vim_style_key_config.ron) with `h`, `j`, `k`, `l` to navigate and `Ctrl + C` to leave. | ||
You can use it to replace `key_config.ron` and get a vim style setting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// bit for modifiers | ||
// bits: 0 None | ||
// bits: 1 SHIFT | ||
// bits: 2 CONTROL | ||
( | ||
tab_status: ( code: Char('1'), modifiers: ( bits: 0,),), | ||
tab_log: ( code: Char('2'), modifiers: ( bits: 0,),), | ||
tab_stashing: ( code: Char('3'), modifiers: ( bits: 0,),), | ||
tab_stashes: ( code: Char('4'), modifiers: ( bits: 0,),), | ||
|
||
tab_toggle: ( code: Tab, modifiers: ( bits: 0,),), | ||
tab_toggle_reverse: ( code: BackTab, modifiers: ( bits: 0,),), | ||
tab_toggle_reverse_windows: ( code: BackTab, modifiers: ( bits: 1,),), | ||
|
||
focus_workdir: ( code: Char('w'), modifiers: ( bits: 0,),), | ||
focus_stage: ( code: Char('s'), modifiers: ( bits: 0,),), | ||
focus_right: ( code: Char('l'), modifiers: ( bits: 0,),), | ||
focus_left: ( code: Char('h'), modifiers: ( bits: 0,),), | ||
focus_above: ( code: Char('k'), modifiers: ( bits: 0,),), | ||
focus_below: ( code: Char('j'), modifiers: ( bits: 0,),), | ||
|
||
exit: ( code: Char('c'), modifiers: ( bits: 2,),), | ||
exit_popup: ( code: Esc, modifiers: ( bits: 0,),), | ||
|
||
close_msg: ( code: Enter, modifiers: ( bits: 0,),), | ||
open_commit: ( code: Char('c'), modifiers: ( bits: 0,),), | ||
open_commit_editor: ( code: Char('E'), modifiers: ( bits: 0,),), | ||
open_help: ( code: F(1), modifiers: ( bits: 0,),), | ||
|
||
move_left: ( code: Char('h'), modifiers: ( bits: 0,),), | ||
move_right: ( code: Char('l'), modifiers: ( bits: 0,),), | ||
home: ( code: Home, modifiers: ( bits: 0,),), | ||
end: ( code: End, modifiers: ( bits: 0,),), | ||
move_up: ( code: Char('k'), modifiers: ( bits: 0,),), | ||
move_down: ( code: Char('j'), modifiers: ( bits: 0,),), | ||
page_up: ( code: Char('u'), modifiers: ( bits: 2,),), | ||
page_down: ( code: Char('d'), modifiers: ( bits: 2,),), | ||
|
||
shift_up: ( code: Char('K'), modifiers: ( bits: 0,),), | ||
shift_down: ( code: Char('J'), modifiers: ( bits: 0,),), | ||
|
||
enter: ( code: Enter, modifiers: ( bits: 0,),), | ||
|
||
edit_file: ( code: Char('I'), modifiers: ( bits: 0,),), | ||
|
||
status_stage_file: ( code: Enter, modifiers: ( bits: 0,),), | ||
status_stage_all: ( code: Char('a'), modifiers: ( bits: 0,),), | ||
status_reset_file: ( code: Char('U'), modifiers: ( bits: 0,),), | ||
|
||
diff_reset_hunk: ( code: Enter, modifiers: ( bits: 0,),), | ||
status_ignore_file: ( code: Char('i'), modifiers: ( bits: 0,),), | ||
|
||
stashing_save: ( code: Char('w'), modifiers: ( bits: 0,),), | ||
stashing_toggle_untracked: ( code: Char('u'), modifiers: ( bits: 0,),), | ||
stashing_toggle_index: ( code: Char('m'), modifiers: ( bits: 0,),), | ||
|
||
stash_apply: ( code: Enter, modifiers: ( bits: 0,),), | ||
stash_open: ( code: Char('l'), modifiers: ( bits: 0,),), | ||
stash_drop: ( code: Char('D'), modifiers: ( bits: 0,),), | ||
|
||
cmd_bar_toggle: ( code: Char('.'), modifiers: ( bits: 0,),), | ||
log_commit_details: ( code: Enter, modifiers: ( bits: 0,),), | ||
log_tag_commit: ( code: Char('t'), modifiers: ( bits: 0,),), | ||
commit_amend: ( code: Char('A'), modifiers: ( bits: 0,),), | ||
copy: ( code: Char('y'), modifiers: ( bits: 0,),), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.