Alex Rivera | Logout

mapping function keys in vim

Asked 2010-08-19T07:09:11.580
33

I want to map my F2 for nerdtree with the following entry:

map <F2> :NERDTreeToggle<CR>

But even before that, and after saving the vimrc , whenever i press F2, it just switches the case of the letters on which the cursor is present. Later found out that any function key does it. F5 switches case of 5 characters and so on. Is this because of some other plugin? I presently use c.vim , snippetsEmu , surround , nerdtree , and minibufexpl

There are no keymappings to any function key in my vimrc.

Edit
Report

1 Answer

10
:map <F2> :NERDTreeToggle<CR>

After starting Vim you can look with

:map <F2>

what F2 is mapped to. It is possible that the plugins change the mapping (not visible in .vimrc)

answered 2010-08-19T08:36:12.403

Your Answer