commit: 2024-12-16 17:38:30
This commit is contained in:
parent
6fee6c67d4
commit
a3f56c03b4
@ -57,3 +57,15 @@ vim.cmd('set shiftwidth=4')
|
|||||||
vim.cmd('set expandtab')
|
vim.cmd('set expandtab')
|
||||||
|
|
||||||
vim.o.hidden = true
|
vim.o.hidden = true
|
||||||
|
|
||||||
|
-- wrap selected text in single quotes
|
||||||
|
vim.keymap.set('x', "<leader>'", function()
|
||||||
|
local text = vim.fn.getreg('"') -- Get the visually selected text
|
||||||
|
vim.cmd("normal! c'" .. text .. "'")
|
||||||
|
end, { desc = "Wrap selected text in single quotes" })
|
||||||
|
|
||||||
|
-- wrap selected text in double quotes
|
||||||
|
vim.keymap.set('x', '<leader>"', function()
|
||||||
|
local text = vim.fn.getreg('"') -- Get the visually selected text
|
||||||
|
vim.cmd('normal! c"' .. text .. '"')
|
||||||
|
end, { desc = "Wrap selected text in double quotes" })
|
||||||
|
Loading…
Reference in New Issue
Block a user