Skip to content

Commit

Permalink
Add VI toggle for CTRL + SHIFT + SPACE on win (#496)
Browse files Browse the repository at this point in the history
* add toggle vi mode for `windows`

* update keybinding for windows vi mode

* fix: add keybinding to wa impl

* docs: update windows keybinding
  • Loading branch information
zackartz authored Apr 28, 2024
1 parent 369ce98 commit 536bc9b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/key-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ language: 'en'
| Action | Key |
| -------------------- | ----------------------------------------------------------- |
| Open configuration | `Control + Shift + Comma (,)` |
| Toggle VI Mode | `Alt + Shift + Space` |
| Toggle VI Mode | `Control + Shift + Space` |
| Copy | `Control + Shift + C` |
| Paste | `Control + Shift + V` |
| Create new window | `Control + Shift + N` |
Expand Down
1 change: 1 addition & 0 deletions frontends/rioterm/src/bindings/bindings_wa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,7 @@ pub fn platform_key_bindings(
// https://github.com/alacritty/alacritty/issues/2930
// https://github.com/raphamorim/rio/issues/220#issuecomment-1761651339
Key::Named(Backspace), Modifiers::CONTROL, ~BindingMode::VI; Action::Esc("\u{0017}".into());
Key::Named(Space), Modifiers::CONTROL | Modifiers::SHIFT, Action::ToggleViMode;
);

if use_navigation_key_bindings {
Expand Down
1 change: 1 addition & 0 deletions frontends/rioterm/src/bindings/bindings_winit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,7 @@ pub fn platform_key_bindings(
// https://github.com/alacritty/alacritty/issues/2930
// https://github.com/raphamorim/rio/issues/220#issuecomment-1761651339
Key::Named(Backspace), ModifiersState::CONTROL, ~BindingMode::VI; Action::Esc("\u{0017}".into());
Key::Named(Space), ModifiersState::CONTROL | ModifiersState::SHIFT; Action::ToggleViMode;
);

if use_navigation_key_bindings {
Expand Down

0 comments on commit 536bc9b

Please sign in to comment.