Completely redone command mode, inspired by Sublime.