Re: [Tutor] vim as a python editor

2011-02-08 Thread Paul Griffiths
On 8 February 2011 04:44, Alexander Fairley wrote:

> Some high profile ruby hackers have put together a pretty snazzy set of
> vim/gvim configs together on github at
>
> https://github.com/carlhuda/janus
>
>
Thank you, but I think this only works on OSX?  I use Ubuntu and if I
understand your link correctly, gvim has the equivalent functionality.



> On the topic of configuring Capslock to be an escape key, it's because
> that's where the "meta" key used to be on old school unix keyboards, and so
> it makes you double plus unix if you reconfigure things that way(also has
> the plus of rendering emacs a lot more usable).
>


Sorry, I don't know what 'meta' key and 'double plus' means.   What I've now
done, using Preferences > Keyboard, is to swap the functionality of the Esc
and Caps Lock keys.  This helps me because I'm a fairly competent touch
typist.  Every time I need to press Esc on a default keyboard, I have to
lift my left hand from the asdf home keys to get at it.  This 'breaks the
flow' and gets quite annoying after a while.


>
> On Fri, Jan 7, 2011 at 7:22 PM, Steven D'Aprano wrote:
>
>> Alan Gauld wrote:
>>
>>> "Paul Griffiths"  wrote
>>>
 I've learned that:
 ...

 - re-configuring the Caps Lock to be an extra Esc saves time

>>>
>>> Huh? How do you use that? Its a new one on me. Why would two escape keys
>>> be useful?
>>>
>>
>> What if you want to escape the escape, so that (say) esc-C is the same as
>> just C?
>>
>>
>> Not-very-helpfully y'rs,
>>
>> --
>> Steven
>>
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2011-02-07 Thread Alexander Fairley
Some high profile ruby hackers have put together a pretty snazzy set of
vim/gvim configs together on github at

https://github.com/carlhuda/janus

On the topic of configuring Capslock to be an escape key, it's because
that's where the "meta" key used to be on old school unix keyboards, and so
it makes you double plus unix if you reconfigure things that way(also has
the plus of rendering emacs a lot more usable).

On Fri, Jan 7, 2011 at 7:22 PM, Steven D'Aprano  wrote:

> Alan Gauld wrote:
>
>> "Paul Griffiths"  wrote
>>
>>> I've learned that:
>>> ...
>>> - re-configuring the Caps Lock to be an extra Esc saves time
>>>
>>
>> Huh? How do you use that? Its a new one on me. Why would two escape keys
>> be useful?
>>
>
> What if you want to escape the escape, so that (say) esc-C is the same as
> just C?
>
>
> Not-very-helpfully y'rs,
>
> --
> Steven
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2011-01-07 Thread Steven D'Aprano

Alan Gauld wrote:

"Paul Griffiths"  wrote

I've learned that:
...
- re-configuring the Caps Lock to be an extra Esc saves time


Huh? How do you use that? Its a new one on me. Why would two escape keys 
be useful?


What if you want to escape the escape, so that (say) esc-C is the same 
as just C?



Not-very-helpfully y'rs,

--
Steven

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2011-01-07 Thread ALAN GAULD


> > useful?
> 
> I believe this is so you don't have to reach as far to  hit ESC; caps
> lock is located right next to the A key.

Ah, that might make sense. I used to have a utility on my old Sun 
workstation to remap Caps lock to Ctrl because Ctrl was originally 
(on the first Sun's) where Ca[ps lock is and it made typing Ctrl 
sequences in emacs much easier.

But as a non touch typist the fraction of a second it would save 
me is not really very helpful :-)

Alan G.

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2011-01-07 Thread ashish makani
@Alan, maybe hitting the actual "Esc" key requires too much "reach"
Mapping CapsLock to escape maybe lets u type faster, perhaps

I am just guessing though..maybe Paul can explain

On vim, just saw this on hnews today morning...might be of interest

http://news.ycombinator.com/item?id=2080342
http://vim.runpaint.org/

Happy Friday

cheers
ashish


On Fri, Jan 7, 2011 at 1:25 PM, Alan Gauld wrote:

> "Paul Griffiths"  wrote
>
>> I've learned that:
>> ...
>>
>> - re-configuring the Caps Lock to be an extra Esc saves time
>>
>
> Huh? How do you use that? Its a new one on me. Why would two escape keys be
> useful?
>
>
>  - I must learn how to  'fold' functions
>>
>
> Read the vim help.
>
> Also read about ctags - they work with python code too.
> Combining ctags with vim gives you some very powerful navigation tools - ie
> put the cursor on a function name and hit the tags key to go directly to the
> function definition. Even if it's in another file...
>
> HTH,
>
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



--
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2011-01-07 Thread Alan Gauld
"Paul Griffiths"  wrote 


I've learned that:
...
- re-configuring the Caps Lock to be an extra Esc saves time


Huh? How do you use that? Its a new one on me. Why would 
two escape keys be useful?



- I must learn how to  'fold' functions


Read the vim help.

Also read about ctags - they work with python code too.
Combining ctags with vim gives you some very powerful 
navigation tools - ie put the cursor on a function name and 
hit the tags key to go directly to the function definition. 
Even if it's in another file...


HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2011-01-07 Thread Paul Griffiths
On 5 January 2011 11:54, Sean Carolan  wrote:

> > 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.
>
> My setup includes:
>
> autoindent turned on at 4 spaces
> ftplugin for "folding" functions like eclipse (this is my favorite!
> you just push f to expand a function)
> minibufexplorer for opening multiple files
> taglist for jumping around your code to different functions (needs
> exuberant ctags)
>
> Here are some instructions for setting most of these up:
>
> http://dancingpenguinsoflight.com/2009/02/python-and-vim-make-your-own-ide/
>

Thank you Sean for the above link, and to everyone else who replied.  There
is obviously a lot that can be done with vim, but I will take your advice
and build up these skills gradually and try to concentrate on learning
python!

I've learned that:

- gvim may suit me better than vim
- a tabbed console is not as good as having a separate window for vim, the
python interpreter and the shell. (thank you Alan)
- re-configuring the Caps Lock to be an extra Esc saves time
- I must learn how to  'fold' functions
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2010-12-22 Thread Brett Ritter
On Wed, Dec 15, 2010 at 7:30 PM, Alan Gauld  wrote:
> I also use split screen view in vim so that within vim I often have
> two or three buffers open at once all displayed in a split screen.

I know you prefer "default" settings, but one mapping I tend to stick
in my .vimrcs whereever I go:

nmap  w_

Which moves to the next screen and maximizes it.  = will return
to the equally distributed split screens.  When coding an AJAX app,
for example, I'll often have the HTML, the JS, the CSS, and the Python
service, and the tests all up at once.

I also use "screen" a lot because I'm often working on remote machines
without X involved, plus it lets me bounce between shell (docs, git,
etc) and editing easily with the added benefit of not having to worry
about communication disruption (local power outage, etc) killing my
work in progress.  Often once I get an environment perfectly tailored
(yay for virtualenv) I'll have a screen session manage the entire
thing until the project is done, just reconnecting to it when I'm
working on it.  I highly recommend both screen and virtualenv to
anyone that is unfamiliar with them.

-- 
Brett Ritter / SwiftOne
swift...@swiftone.org
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


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

2010-12-17 Thread Joel Schwartz
Thanks for all the good advice guys!

Joel

> -Original Message-
> From: tutor-bounces+joel=joelschwartz@python.org 
> [mailto:tutor-bounces+joel=joelschwartz@python.org] On 
> Behalf Of Alan Gauld
> Sent: Thursday, December 16, 2010 4:27 PM
> To: tutor@python.org
> Subject: Re: [Tutor] vim as a python editor; FOLLOW-UP QUESTION
> 
> "Joel Schwartz"  wrote
> > you experts whether it makes sense (or is even possible) to 
> use vim in 
> > Windows (I use Windows XP-SP3).
> 
> Yes, vim is great on Windows.
> When i used unix primarily I was an emacs fan, but emacs just 
> doesn't feel right on windows to me so I moved to vim which 
> works hust as well in both OS.
> 
> > One more question: IDLE does not appear to have a way to 
> review your 
> > command history, e.g., by hitting the up arrow.
> 
> IDLE borrows from emacs and uses ALT-P and ALT-N.
> (FWIW Pythonwin uses Ctrl-UP/Ctrl-Down for the same purpose)
> 
> > 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?
> 
> Pythonwin is better than IDLE for Windows users. It has 
> integration with COM for object browsing and also with the 
> Windows help system.
> And the debugger is much better than the IDLE one too.
> 
> And it users the same editor control as Scite.
> Speaking of Scite, it is a pretty useful editor in its own 
> right and adds tabbed editing which Pythonwin doesn't have, 
> but OTOH it loses all the Python specific tools. my ideal 
> Windows text editor would be a combination of Scite and vim...
> 
> Finally, if you have a PC big enough to run it well, Eclipse 
> and Pydev are a good combination. Especially if you also work 
> in Java or C++ etc
> 
> And there are a bunch of others that folks like. IDEs and 
> text editors are very personal choices. Wingz, SPE, 
> PyCrust/PyAlaMode, and more.
> 
> HTH,
> 
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> 
> 
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
> 


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


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

2010-12-16 Thread Alan Gauld

"Joel Schwartz"  wrote
you experts whether it makes sense (or is even possible) to use vim 
in

Windows (I use Windows XP-SP3).


Yes, vim is great on Windows.
When i used unix primarily I was an emacs fan, but emacs just
doesn't feel right on windows to me so I moved to vim which
works hust as well in both OS.


One more question: IDLE does not appear to have a way to
review your command history, e.g., by hitting the up arrow.


IDLE borrows from emacs and uses ALT-P and ALT-N.
(FWIW Pythonwin uses Ctrl-UP/Ctrl-Down for the same purpose)

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?


Pythonwin is better than IDLE for Windows users. It has integration
with COM for object browsing and also with the Windows help system.
And the debugger is much better than the IDLE one too.

And it users the same editor control as Scite.
Speaking of Scite, it is a pretty useful editor in its own right and 
adds

tabbed editing which Pythonwin doesn't have, but OTOH it loses all
the Python specific tools. my ideal Windows text editor would be a
combination of Scite and vim...

Finally, if you have a PC big enough to run it well, Eclipse and
Pydev are a good combination. Especially if you also work in Java
or C++ etc

And there are a bunch of others that folks like. IDEs and text editors
are very personal choices. Wingz, SPE, PyCrust/PyAlaMode, and more.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


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

2010-12-16 Thread Wayne Werner
On Thu, Dec 16, 2010 at 12:58 PM, Joel Schwartz wrote:

> 

whether it makes sense (or is even possible) to use vim in
> Windows (I use Windows XP-SP3).
> 

Alternatively, is there another basic Python GUI
> that has the up-arrow command history feature and is also good for Python
> coding in general?
>

On Windows and Linux both I use vim and IPython. They make a rather powerful
combination. Then again so do a lot of other configurations, so whatever you
feel comfortable with.

The vim keybindings are extremely powerful, though, and regardless of what
editor you choose, I recommend picking one that has good keybindings either
natively or through a plugin.

HTH,
Wayne
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


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

2010-12-16 Thread python
Joel,

> One more question: IDLE does not appear to have a way to review your command
> history, e.g., by hitting the up arrow.

To move through your command history, use Alt+P (previous) and Alt+N
(next).

Malcolm
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


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

2010-12-16 Thread Steve Willoughby

On 16-Dec-10 10:58, Joel Schwartz wrote:

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).


Vim works wonderfully in Windows, actually, which IMHO really needs an 
advanced text editor like vi or emacs or something.



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?


If you use the up-arrow to move your cursor to previous lines in the 
IDLE window and hit ENTER, you recall that line where you can edit and 
re-enter it.




--
Steve Willoughby / st...@alchemy.com
"A ship in harbor is safe, but that is not what ships are built for."
PGP Fingerprint 48A3 2621 E72C 31D9 2928 2E8F 6506 DB29 54F7 0F53
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


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

2010-12-16 Thread bob gailer

On 12/16/2010 1:58 PM, Joel Schwartz wrote:

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).
FWIW I started 10 years ago using Python For Windows as my development 
environment. I have never regretted that choice.


--
Bob Gailer
919-636-4239
Chapel Hill NC

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


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

2010-12-16 Thread Joel Schwartz
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@python.org
[mailto:tutor-bounces+joel=joelschwartz@python.org] On Behalf Of
Knacktus
Sent: Wednesday, December 15, 2010 11:52 PM
To: tutor@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  :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@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2010-12-15 Thread Knacktus

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


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2010-12-15 Thread Knacktus

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  :w\|!python %

- added the following to .bashrc:
 EDITOR=vim
 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.
Sure. I'm more an IDE-guy for Python now, but in my "before-days" with 
Fortran I used pretty much this approach.
Even though I'm using an IDE (on Windows) myself, I would recommend 
learning vi/vim.


Regs,

Jan




PaulG



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] vim as a python editor

2010-12-15 Thread Alan Gauld


"Paul Griffiths"  wrote


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 use both IDLE (for simple short scipts) and vim (for bigger
multi-file projects).

I use vim pretty much out of the box, I deliberately don't configure
it because I want it to work the same on any Linux box I log into.
I use the standad Python syntax highlighting scheme.

There is an IDLE-style settings file available somewhere that
will make vim superficially like IDLE, but personally I didn't
find it helped much and I prefer to keep to standard vim.


- added the following to .bashrc:
   EDITOR=vim
   export EDITOR


You should do the same for VISUAL.
Some programs distinguish between EDITOR and VISUAL and
the default for both is ed...


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.


I don't use a tabbed console but prefer three windows(*).
One running graphical vim (vim -g), one running the python
interpreter and one a standard shell prompt. My mode of
working is try something in the interpreter, when it works translate
it into vim. Save the file and then run it in the shell window (up 
arrow

is my friend).

(*) I usually have a browser open at the Python documentation too.
And I have Firefox shortcuts/tags set up so I go to my favourite
pages - like the module A-Z listing - in one short code (ie a-z).

I also use split screen view in vim so that within vim I often have
two or three buffers open at once all displayed in a split screen.
One addition I'd like in vim 8 is the ability to have tabbed editor
buffers in addition to split screens. Switching buffers isn't hard
but tabs make it much easier. (Scite has tabs but no split screen
and that's worse, but I'd like both!)


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


Works for me, and a lot of other folks too.

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] vim as a python editor

2010-12-15 Thread 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  :w\|!python %

- added the following to .bashrc:
EDITOR=vim
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.


PaulG
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor