I think that you are simply missing a literal <CR>
. Type this command in the command line followed by Enter.
:map <F2> :ls<CR>
If it doesn't work…
See if that
_exrc
file is executed by Vim::scriptnames
should display it near the top.If it is executed, see if
<F2>
is mapped elsewhere::verbose map <F2>
.
Anyway, Vim is not Vi. You should use :mkvimrc!
. Or a normal $HOME/_vimrc
.
edit
FYI I just created a ~/.exrc
file using :mkexrc!
and it's not executed by Vim at startup. You should definitely use a normal $HOME/_vimrc
.