surround maps

This commit is contained in:
Christoph J. Scherr 2023-09-14 16:19:30 +02:00
parent df7318dac1
commit afd343c399
1 changed files with 13 additions and 13 deletions

View File

@ -204,13 +204,13 @@ return {
local plugin = require('lazy.core.config').spec.plugins['mini.surround']
local opts = require('lazy.core.plugin').values(plugin, 'opts', false)
local mappings = {
{ opts.mappings.add, desc = 'Add surrounding', mode = { 'n', 'x' } },
{ opts.mappings.delete, desc = 'Delete surrounding' },
{ opts.mappings.find, desc = 'Find right surrounding' },
{ opts.mappings.find_left, desc = 'Find left surrounding' },
{ opts.mappings.highlight, desc = 'Highlight surrounding' },
{ opts.mappings.replace, desc = 'Replace surrounding' },
{ opts.mappings.update_n_lines, desc = 'Update `MiniSurround.config.n_lines`' },
{ opts.mappings.add, desc = 'Add surrounding', mode = { 'n', 'x', 'v' } },
{ opts.mappings.delete, desc = 'Delete surrounding', mode = { 'n', 'x', 'v' } },
{ opts.mappings.find, desc = 'Find right surrounding', mode = { 'n', 'x', 'v' } },
{ opts.mappings.find_left, desc = 'Find left surrounding', mode = { 'n', 'x', 'v' } },
{ opts.mappings.highlight, desc = 'Highlight surrounding', mode = { 'n', 'x', 'v' } },
{ opts.mappings.replace, desc = 'Replace surrounding', mode = { 'n', 'x', 'v' } },
{ opts.mappings.update_n_lines, desc = 'Update `MiniSurround.config.n_lines`', mode = { 'n', 'x', 'v' } },
}
mappings = vim.tbl_filter(function(m)
return m[1] and #m[1] > 0
@ -220,12 +220,12 @@ return {
opts = {
mappings = {
add = '<leader>sa', -- Add surrounding in Normal and Visual modes
delete = 'ds', -- Delete surrounding
find = 'gzf', -- Find surrounding (to the right)
find_left = 'gzF', -- Find surrounding (to the left)
highlight = 'gzh', -- Highlight surrounding
replace = 'cs', -- Replace surrounding
update_n_lines = 'gzn', -- Update `n_lines`
delete = '<leader>sd', -- Delete surrounding
find = '<leader>sf', -- Find surrounding (to the right)
find_left = '<leader>sF', -- Find surrounding (to the left)
highlight = '<leader>sh', -- Highlight surrounding
replace = '<leader>cs', -- Replace surrounding
update_n_lines = '<leader>su', -- Update `n_lines`
},
},
},