From c65b4dea099abc7512720e8407b53a3742083039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20K=C4=99pka?= Date: Mon, 7 Jun 2021 20:13:40 +0200 Subject: [PATCH] commands: Add replace with yanked as `R` --- helix-term/src/commands.rs | 20 ++++++++++++++++++++ helix-term/src/keymap.rs | 1 + 2 files changed, 21 insertions(+) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 0c33241f..0da23fc7 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1948,6 +1948,26 @@ fn _paste(reg: char, doc: &mut Document, view: &View, action: Paste) -> Option paste every yanked selection after selected text // alt-P => paste every yanked selection before selected text // R => replace selected text with yanked text diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs index d2fa46c7..0324fd04 100644 --- a/helix-term/src/keymap.rs +++ b/helix-term/src/keymap.rs @@ -156,6 +156,7 @@ pub fn default() -> Keymaps { // and matching set for select mode (extend) // key!('r') => commands::replace, + key!('R') => commands::replace_with_yanked, KeyEvent { code: KeyCode::Home,