[Tutor] vim as a python editor; FOLLOW-UP QUESTION

Joel Schwartz joel at joelschwartz.com
Thu Dec 16 19:58:06 CET 2010


I'm new to Python and have been using IDLE for Python programming. My only
other significant text editor experience is with Notepad++ and Tinn-R, which
I've used for R programming. Vim seems more efficient, but I wanted to ask
you experts whether it makes sense (or is even possible) to use vim in
Windows (I use Windows XP-SP3). 

One more question: IDLE does not appear to have a way to review your command
history, e.g., by hitting the up arrow. I find the up-arrow to be an
incredible convenience when I'm working on the R command line, and the lack
of it in IDLE is often a source of frustration for me. Is there any way to
set up IDLE to do this? Alternatively, is there another basic Python GUI
that has the up-arrow command history feature and is also good for Python
coding in general?

Thanks,
Joel

-----Original Message-----
From: tutor-bounces+joel=joelschwartz.com at python.org
[mailto:tutor-bounces+joel=joelschwartz.com at python.org] On Behalf Of
Knacktus
Sent: Wednesday, December 15, 2010 11:52 PM
To: tutor at python.org
Subject: Re: [Tutor] vim as a python editor

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

_______________________________________________
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