[Tutor] vim as a python editor

Knacktus knacktus at googlemail.com
Thu Dec 16 08:51:59 CET 2010


Am 15.12.2010 23:26, schrieb Paul Griffiths:
> 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:
>      EDITOR=vim
>      export EDITOR

I forgot:
Here some more information about vim and Python:

http://wiki.python.org/moin/Vim

Some guy tuned vim to the maximum with code completion and everything. 
But start simple to learn the basics. You can extend anytime later.

Jan

>
> 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.
>
>
> PaulG
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list