Move vim commands from functions to shell