1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 03:14:55 +02:00

nvim/lua/user/keymaps.lua: path formatting

This commit is contained in:
Henrik Hautakoski 2025-07-21 05:51:11 +02:00
parent f946f2ea6d
commit c0075ac1ab

View file

@ -46,6 +46,10 @@ vim.keymap.set('x', '<leader>fha', [[:s/0x\(\x\{1\}\X\)/0x0\1/g]],
vim.keymap.set('x', '<leader>fhn', [[:s/\(\(0x\x\{1,2\}, \)\{8\}\)/\1\r/g]],
{ desc = "Format a comma separated hex list into 8 bytes per line." })
-- Paths
vim.keymap.set('x', '<leader>fp', "noop", { desc = "Format path" })
vim.keymap.set('x', '<leader>fpw', [[:s~/~\\\\~g<CR>]], { desc = "Format path from linux to windows" })
vim.keymap.set('x', '<leader>fpl', [[:s~\\\\~/~g<CR>]], { desc = "Format path from windows to linux" })
--
-- Editing - Copy / Paste