From 4d8de6b3bc5c734943605faede35b225780ee65e Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Wed, 17 Nov 2021 08:35:53 -0500 Subject: [PATCH] vim: search and sub on selected --- nvim.configlink/init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nvim.configlink/init.lua b/nvim.configlink/init.lua index ea41c2e..d49382f 100644 --- a/nvim.configlink/init.lua +++ b/nvim.configlink/init.lua @@ -491,7 +491,7 @@ vim.g.maplocalleader = " " key("v", "<", "", ">gv") --- Unset search pattern register +-- Clear search register key("n", "", ":noh", {silent=true}) -- Shuffle lines around @@ -506,6 +506,7 @@ key("v", "", ":m '<-2gv=gv") key("n", "/", ":Telescope live_grep") key("n", "ff", ":Telescope find_files") key("n", "fa", ":Telescope file_browser") +key("n", "fw", ":Telescope grep_string") key("n", "wt", ":Telescope tmux sessions") key("n", "ww", ":Telescope tmux windows") key("n", "w/", ":Telescope tmux pane_contents") @@ -581,6 +582,7 @@ key("i", '!', "!u") key("i", '?', "?u") -- Other -key("t", "", "") --- Exit terminal mode -key("n", "", ":noh", {silent=true}) --- Clear search -key("n", "Y", "y$") --- Copy to end of line +key("t", "", "") --- Exit terminal mode +key("n", "", ":noh", {silent=true}) --- Clear search in VimWiki +key("n", "Y", "y$") --- Copy to end of line +key("v", "", "y:%s/+//gc") --- Substitute selected