summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-13 23:14:58 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-01-13 23:14:58 +0100
commite0417687471c9de0dfb20c50093ad61a040be8e6 (patch)
treeb52e71769f81e6d7da7b9b3aead12f3a6da6e093 /lua
parente7ff4471b3095d6e09940c040855f910ce1921a9 (diff)
Add spectre replace to which key
Diffstat (limited to 'lua')
-rw-r--r--lua/config/whichkey.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/config/whichkey.lua b/lua/config/whichkey.lua
index b1b57d2..94aa65a 100644
--- a/lua/config/whichkey.lua
+++ b/lua/config/whichkey.lua
@@ -173,6 +173,12 @@ local mappings = {
k = { "<cmd>Telescope keymaps<cr>", "Keymaps" },
C = { "<cmd>Telescope commands<cr>", "Commands" },
},
+ r = {
+ name = "Replace",
+ r = { "<cmd>lua require('spectre').open()<cr>", "Replace" },
+ w = { "<cmd>lua require('spectre').open_visual({select_word=true})<cr>", "Replace Word" },
+ f = { "<cmd>lua require('spectre').open_file_search()<cr>", "Replace Buffer" },
+ },
-- t = {
-- name = "Terminal",