Add vi search paste bindings

Closes #7511.
This commit is contained in:
Omar Magdy 2024-01-04 19:57:53 +02:00 committed by GitHub
parent 5685ce8bf8
commit d47aab93c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View File

@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 0.14.0-dev
### Added
- Support for pasting in Vi + Search mode
### Fixed
- `alacritty migrate` failing with nonexistent imports

View File

@ -445,6 +445,7 @@ pub fn default_key_bindings() -> Vec<KeyBinding> {
Copy; Action::Copy;
Copy, +BindingMode::VI; Action::ClearSelection;
Paste, ~BindingMode::VI; Action::Paste;
Paste, +BindingMode::VI, +BindingMode::SEARCH; Action::Paste;
"l", ModifiersState::CONTROL; Action::ClearLogNotice;
"l", ModifiersState::CONTROL; Action::ReceiveChar;
Home, ModifiersState::SHIFT, ~BindingMode::ALT_SCREEN; Action::ScrollToTop;
@ -546,6 +547,7 @@ fn common_keybindings() -> Vec<KeyBinding> {
bindings!(
KeyBinding;
"v", ModifiersState::CONTROL | ModifiersState::SHIFT, ~BindingMode::VI; Action::Paste;
"v", ModifiersState::CONTROL | ModifiersState::SHIFT, +BindingMode::VI, +BindingMode::SEARCH; Action::Paste;
"f", ModifiersState::CONTROL | ModifiersState::SHIFT, ~BindingMode::SEARCH; Action::SearchForward;
"b", ModifiersState::CONTROL | ModifiersState::SHIFT, ~BindingMode::SEARCH; Action::SearchBackward;
Insert, ModifiersState::SHIFT, ~BindingMode::VI; Action::PasteSelection;
@ -602,6 +604,7 @@ pub fn platform_key_bindings() -> Vec<KeyBinding> {
"k", ModifiersState::SUPER, ~BindingMode::VI, ~BindingMode::SEARCH; Action::Esc("\x0c".into());
"k", ModifiersState::SUPER, ~BindingMode::VI, ~BindingMode::SEARCH; Action::ClearHistory;
"v", ModifiersState::SUPER, ~BindingMode::VI; Action::Paste;
"v", ModifiersState::SUPER, +BindingMode::VI, +BindingMode::SEARCH; Action::Paste;
"n", ModifiersState::SUPER; Action::CreateNewWindow;
"f", ModifiersState::CONTROL | ModifiersState::SUPER; Action::ToggleFullscreen;
"c", ModifiersState::SUPER; Action::Copy;

View File

@ -42,6 +42,10 @@ configuration. See *alacritty*(5) for full configuration format documentation.
: _"Control"_
:[
: _"ClearLogNotice"_
| _"Paste"_
:[
: _"Vi|Search"_
: _"Paste"_
| _"L"_
: _"Control"_
: _"~Vi|~Search"_
@ -344,6 +348,10 @@ configuration. See *alacritty*(5) for full configuration format documentation.
: _"Control|Shift"_
: _"~Vi"_
: _"Paste"_
| _"V"_
: _"Control|Shift"_
: _"Vi|Search"_
: _"Paste"_
| _"C"_
: _"Control|Shift"_
:[
@ -440,7 +448,11 @@ configuration. See *alacritty*(5) for full configuration format documentation.
: _"DecreaseFontSize"_
| _"V"_
: _"Command"_
:[
: _"~Vi"_
: _"Paste"_
| _"V"_
: _"Command"_
: _"Vi|Search"_
: _"Paste"_
| _"C"_
: _"Command"_