enable mode selection for vim and emacs