- For editing long commands, after setting your editor (for example  export EDITOR=vim ), ctrl-x ctrl-e will open the current command in an editor for multi-line editing. Or in vi style, escape-v.