mirror of
https://github.com/pnx/dotfiles
synced 2026-07-04 15:23:40 +02:00
nvim/lua/user/keymaps.lua: style fixes
This commit is contained in:
parent
655c0ccaf6
commit
aba8d805ad
1 changed files with 7 additions and 4 deletions
|
|
@ -36,9 +36,12 @@ vim.keymap.set('x', '<leader>ff', [[:Format<CR>]], { desc = 'Format section', si
|
||||||
|
|
||||||
-- Hex Formatting
|
-- Hex Formatting
|
||||||
vim.keymap.set('x', '<leader>fh', "noop", { desc = "Format hex" })
|
vim.keymap.set('x', '<leader>fh', "noop", { desc = "Format hex" })
|
||||||
vim.keymap.set('x', '<leader>fhx', [[:s/\(\x\{2\}\)/0x\1, /g]], { desc = "Format a hex string into a comma separated list with 0x prefix." })
|
vim.keymap.set('x', '<leader>fhx', [[:s/\(\x\{2\}\)/0x\1, /g]],
|
||||||
vim.keymap.set('x', '<leader>fha', [[:s/0x\(\x\{1\}\X\)/0x0\1/g]], { desc = "Align a hex string so that all numbers are 2 characters long (0x2 -> 0x02) " })
|
{ desc = "Format a hex string into a comma separated list with 0x prefix." })
|
||||||
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." })
|
vim.keymap.set('x', '<leader>fha', [[:s/0x\(\x\{1\}\X\)/0x0\1/g]],
|
||||||
|
{ desc = "Align a hex string so that all numbers are 2 characters long (0x2 -> 0x02) " })
|
||||||
|
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." })
|
||||||
|
|
||||||
-- Case formatting
|
-- Case formatting
|
||||||
vim.keymap.set('x', '<leader>fc', "noop", { desc = "Case" })
|
vim.keymap.set('x', '<leader>fc', "noop", { desc = "Case" })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue