[Tutor] vim as a python editor

Paul Griffiths paulmg2010 at gmail.com
Wed Dec 15 23:26:38 CET 2010

Hi - I'm a beginner at programming and Python.

I have been looking for an editor to replace Idle and tried out a few.
I liked Geany but decided on vim because I am also learning Linux
and the vim skills might be useful.  I run Python 2.6.5 on Ubuntu 10.04.

How have those of you who use vim configured it?  I have looked
on the web but got a bit confused by the advice and options.

I am currently following some of the advice in the on-line tutorial at
http://openbookproject.net/thinkcs/python/english2e/app_c.html and

- installed the full version of vim (sudo apt-get install vim-gnome)
- created a .vimrc file in my home directory and entered
    syntax enable
    filetype indent on
    set et
    set sw=4
    set smarttab
    map <f2> :w\|!python %

- added the following to .bashrc:
    export EDITOR

I open up a terminal in the folder where I keep my python files and
create two additional tabs in this terminal.  I use the first tab to
run python, the second one to run vim and the third one for running
linux commands such as ls to list the folder contents.

Is this is a reasonable approach?  Thank you for any feed back.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101215/debb3cc5/attachment.html>

More information about the Tutor mailing list