Skip to content

Commit

Permalink
Add basic key mapping for spectre
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Oct 21, 2024
1 parent 82bd520 commit 78ec2f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ lvim.plugins = {
},
}
end,
keys = {
{ "<leader>ss", "<cmd>lua require('spectre').toggle()<cr>", desc = "Toggle Spectre" },
{
"<leader>sw",
"<cmd>lua require('spectre').open_visual({select_word=true})<cr>",
desc = "Spectre (word)",
},
},
},
{
"neovim/nvim-lspconfig",
Expand Down
2 changes: 2 additions & 0 deletions trees/uts-002F.tree
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ Here are some useful keys that I like using in NeoVim, with [my LunarVim configu
- remember to press `Enter` after typing the search term
- use `<leader>+h` to clear the search highlight
- use `s/before/after/g` to replace all occurrences, remember `%`, otherwise it will only look for the pattern in the current line
- use `:lua require("spectre").toggle()` to toggle the search and replace panel
- `<leader>+R` to replace all occurrences
- edits in normal mode (status quo in VSCode Vim mode)
- select and
- ✅ delete by `d`/`x`
Expand Down

0 comments on commit 78ec2f1

Please sign in to comment.