tags:

views:

127

answers:

2

I have a python script called showdate.py which I want to map to

I do this by:

map <F2> :r! showdate.py

in my _gvimrc file.

The problem is that I have to press enter when I press F2 to execute instead of executing immediately. Any ideas?

Thanks!

+5  A: 

Add a newline to the end of the mapping:

map <F2> :r! showdate.py<CR>
Brian Carper
+1  A: 

I'm not sure if this will work in your case but I remember using '' to simulate a carriage return. So your line will look like:

map <F2> :r! showdate.py <CR>
Marcel Guzman

related questions