Hi All,

I'm using vim editor for Python programming and would like to automate some
tasks.  I would like to map a single key to do the following:

1. Save the Python script I'm working on
2. Run Python interpreter on the script I'm working on.

At the moment, I have the following mapping to automate the above.

:map <F7>  :!python
:map <F6>  :w<enter><F7>

So pressing F6, I can save the file and automate typing :!python.  However,
I still need to manually type the name of the script.  I would like to
automate this as well, so if I press F6, I would get something like:

:map <F6>  :w<enter><F7><whatever_the_name_of_the_script.py><enter>

'appreciate it if you can give some tips or pointers.

Thanks in advance.

Regards,
--gene
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
http://lists.linux.org.ph/mailman/listinfo/plug
Searchable Archives: http://archives.free.net.ph

Reply via email to