bash: factor out functions
vim: another crazy shortcut