neovim-confs/lua/plex/plugins/extras/coding/sandwich.lua

22 lines
1.1 KiB
Lua
Raw Normal View History

2023-09-06 00:26:45 +02:00
return {
{
2023-09-11 14:41:20 +02:00
-- I dont get how this stuff works
2023-09-06 00:26:45 +02:00
'machakann/vim-sandwich',
2023-09-11 14:41:20 +02:00
enabled = false,
2023-09-06 00:26:45 +02:00
-- stylua: ignore
keys = {
-- See https://github.com/machakann/vim-sandwich/blob/master/macros/sandwich/keymap/surround.vim
2023-09-11 14:41:20 +02:00
{ '<leader>sd', '<Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)', silent = true },
{ '<leader>ssd', '<Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)', silent = true },
{ '<leader>sc', '<Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)', silent = true },
{ '<leader>ssc', '<Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)', silent = true },
{ '<leader>sa', '<Plug>(operator-sandwich-add)', silent = true, mode = { 'n', 'x', 'o' }},
{ '<leader>ir', '<Plug>(textobj-sandwich-auto-i)', silent = true, mode = { 'x', 'o' }},
{ '<leader>ab', '<Plug>(textobj-sandwich-auto-a)', silent = true, mode = { 'x', 'o' }},
2023-09-06 00:26:45 +02:00
},
init = function()
vim.g.sandwich_no_default_key_mappings = 1
end,
},
}