Add Esc/autosave keymapping and some filetype detection.