Skip to content

Commit

Permalink
feat: update surrounding config
Browse files Browse the repository at this point in the history
  • Loading branch information
BBboy01 committed Apr 11, 2024
1 parent bd33831 commit 5d83307
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lua/plugins/coding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ return {
return vim.list_extend(mappings, keys)
end,
opts = {
custom_surroundings = {
['b'] = { input = { '%b()', '^.().*().$' }, output = { left = '(', right = ')' } },
['B'] = { input = { '%b{}', '^.().*().$' }, output = { left = '{', right = '}' } },
},
mappings = {
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`
add = 'sa', -- Add surrounding in Normal and Visual modes
delete = 'sd', -- Delete surrounding
replace = 'sr', -- Replace surrounding
update_n_lines = 'sn', -- Update `n_lines`
},
},
},
Expand Down

0 comments on commit 5d83307

Please sign in to comment.