Repository: alacritty/alacritty (language: rust)

Issue:
Paste in Vi Search with key binding 
I haven't seen a key binding that allows pasting in vi search, like `Control+Shift+V` in normal search. That could be useful. 


Discussion / hints:
I think this was just missed because we don't want a paste binding in vi mode, so we'd have to add a separate one for `vi + search`.
I think it was intentional? Like you want a binding to paste in Vi mode you can add one yourself, it's just there's no default, because it's confusing.
> I think it was intentional? Like you want a binding to paste in Vi mode you can add one yourself, it's just there's no default, because it's confusing.

Yeah the problem is not with vi mode, but search in vi mode.

I think we didn't add a binding because it's confusing in vi mode, but I don't think there's any reason why we wouldn't add one in search?
Ah, yeah, we should add it for search + vi.

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5c443c42ff1..f6a138071e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs
index f58744e56de..9e98941948f 100644
--- a/alacritty/src/config/bindings.rs
+++ b/alacritty/src/config/bindings.rs
@@ -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;
diff --git a/extra/man/alacritty-bindings.5.scd b/extra/man/alacritty-bindings.5.scd
index a1c63a099ec..36dd69a9bcf 100644
--- a/extra/man/alacritty-bindings.5.scd
+++ b/extra/man/alacritty-bindings.5.scd
@@ -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"_


Test patch: