Skip to content

Commit

Permalink
feat(mini.surround)!: default surround mappings are now gs instead of…
Browse files Browse the repository at this point in the history
… gz (unless you enabled the leap extra)
  • Loading branch information
folke committed Oct 3, 2023
1 parent 0e66ef8 commit d28c69e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lua/lazyvim/plugins/coding.lua
Expand Up @@ -140,13 +140,13 @@ return {
end,
opts = {
mappings = {
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
update_n_lines = "gzn", -- Update `n_lines`
add = "gsa", -- Add surrounding in Normal and Visual modes
delete = "gsd", -- Delete surrounding
find = "gsf", -- Find surrounding (to the right)
find_left = "gsF", -- Find surrounding (to the left)
highlight = "gsh", -- Highlight surrounding
replace = "gsr", -- Replace surrounding
update_n_lines = "gsn", -- Update `n_lines`
},
},
},
Expand Down
16 changes: 16 additions & 0 deletions lua/lazyvim/plugins/extras/editor/leap.lua
Expand Up @@ -35,6 +35,22 @@ return {
end,
},

-- rename surround mappings from gs to gz to prevent conflict with leap
{
"echasnovski/mini.surround",
opts = {
mappings = {
add = "gza", -- Add surrounding in Normal and Visual modes
delete = "gzd", -- Delete surrounding
find = "gzf", -- Find surrounding (to the right)
find_left = "gzF", -- Find surrounding (to the left)
highlight = "gzh", -- Highlight surrounding
replace = "gzr", -- Replace surrounding
update_n_lines = "gzn", -- Update `n_lines`
},
},
},

-- makes some plugins dot-repeatable like leap
{ "tpope/vim-repeat", event = "VeryLazy" },
}

0 comments on commit d28c69e

Please sign in to comment.