vim map question

Duncan Laurie plug-discuss@lists.plug.phoenix.az.us
Tue, 29 Apr 2003 15:37:06 -0700


Mike Starke wrote:
> I would like to map the <F5> key in vim to insert
> the prsent working directory `pwd`
> 
> How would I construct that line in my .vimrc?
> 

Try something like:

nmap <F5> <Esc>:read !pwd<CR>
imap <F5> <Esc>:read !pwd<CR>

The two lines are the same except nmap changes the key for
"normal" mode, and imap changes it for "insert" mode.

> Does anyone have a good web site that deals with
> the .vimrc file and some easy to follow examples, etc.?
> 

I have found that the online documentation from ":help" is
actually pretty thorough, but I'm sure there are some good
sites out there.  (I'm really more of an emacs fan...)

-duncan