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: add Format binding.

This commit is contained in:
Henrik Hautakoski 2024-09-01 14:32:13 +02:00
parent 3b751ae249
commit 254706c6c5

View file

@ -23,6 +23,7 @@ vim.keymap.set('i', '<S-Tab', '<C-d>', { desc = 'delete indent' })
--
vim.keymap.set('n', '<leader>fs', [[:%s/\s\+$//g<CR>`']], { desc = 'Remove trailing spaces' })
vim.keymap.set('n', '<leader>ff', [[:Format<CR>]], { desc = 'Format file', silent = true, })
-- Hex Formatting
vim.keymap.set('x', '<leader>fhx', [[:s/\(\x\{2\}\)/0x\1, /g]], { desc = "Format hex" })