mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
nvim: keymaps: adding paste mappings
This commit is contained in:
parent
ef2e3a7fc4
commit
45c8e094a2
1 changed files with 9 additions and 1 deletions
|
|
@ -36,8 +36,16 @@ vim.keymap.set('x', '<leader>fhn', [[:s/\(\(0x\x\{1,2\}, \)\{8\}\)/\1\r/g]], { d
|
|||
vim.keymap.set("x", "<leader>fcsc", [[:s/\%V\([a-z]\+\)_\?/\u\1/g]],
|
||||
{ desc = "Convert text from snake_case to CamelCase" })
|
||||
|
||||
--
|
||||
-- Editing - Copy / Paste
|
||||
--
|
||||
|
||||
-- copy/paste
|
||||
-- Maintain the cursor position when yanking a visual selection.
|
||||
vim.keymap.set('v', 'y', 'myy`y')
|
||||
vim.keymap.set('v', 'Y', 'myY`y')
|
||||
|
||||
-- Indent and move to the end when pasting.
|
||||
vim.keymap.set('n', 'p', 'p`[v`]=`>')
|
||||
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>y', [["+y]], {})
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>p', [["+p]], {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue