Add UnAlign

This commit is contained in:
Alex Yatskov 2022-10-21 21:51:48 -07:00
parent a1e4a95ebe
commit 1fc90a78e6

View File

@ -195,3 +195,12 @@ vim.g.rustfmt_autosave = 1
-- hflip.nvim
vim.keymap.set('n', 'gfs', vim.cmd.HFlip)
-- helpers
vim.api.nvim_create_user_command(
'UnAlign',
function(ctx)
vim.cmd(ctx.line1 .. ',' .. ctx.line2 .. 's/\\(\\S\\+\\)\\s\\{2,\\}/\\1 /g')
end,
{ range = '%' }
)