Bash ExpandVars user command

This commit is contained in:
Imbus 2026-03-05 16:59:20 +01:00
parent 0f18468a53
commit 31386141a8

View file

@ -83,4 +83,8 @@ vim.api.nvim_create_user_command('HeaderGuard', function()
print('Header guard inserted: ' .. guard)
end, { desc = 'Insert header guard for current .h file' })
vim.api.nvim_create_user_command('ExpandVars', function()
vim.cmd [[silent! %s/\$\([A-Za-z_][A-Za-z0-9_]*\)/\${\1}/g]]
end, { desc = 'Expand all bash vars' })
-- vim: ts=2 sts=2 sw=2 et