[Tutor] Python + editor

Matthew Navarre mnavarre@anteon.com
Mon, 12 Aug 2002 11:35:22 -0700


On Monday 12 August 2002 08:36 am, Marc wrote:
> Andreas Daskalopoulos (daskalious@softhome.net) wrote:
> > What are you guys using for editing your python files on Linux?
>
> Still use vim (syntax colors very beautiful!)but recently converted to
> nedit ( http://www.nedit.org ):
>

There's a pretty nice vim script that puts a python menu in the menubar a=
t:
http://vim.sourceforge.net/script.php?script_id=3D30
lets you select blocks, indent, dedent and comment out blocks and has a m=
enu=20
with all classes and functions in your script.

> Here is some things I like. Certainly this is possible with others edit=
ors
> too, but nedit make it so easy for laz^H^H^Hbusy people like me that I =
cant
> live without it.
>
> Syntax colors almost as beautiful as vim;
> Easy keyboard AND mouse navigation;
> Ctrl+C,ctrl+V :-);
Vim ain't that hard...
> Show line numbers;
:set nu

> Show matching (), {},[];
:set showmatch (works with any vi)

> Block selection (ctrl+mouse selection).
>      Useful for moving functions around without the indentation;
The python script has a ]v shortcut to select a block. There's also Visua=
l=20
mode in Vim which allows you to do things like
:36 #move to line 36
V #visual block mode
10j #select 10 lines
YY #yank the selection
:75 #move to line 75
p #paste the selection

> Grab shell output (alt-x -> date: Seg Ago 12 12:12:58 BRT 2002);
:r !date

> Can redefine the print command:
>     Install a2ps and gv;
>     Edit .Xdefaults: nedit.printCommand: a2ps -4 -Pdisplay ;
>     Voila: Can print up to four (-4) pages in one side of sheet!;
>         (great for reading Danny's code on a bus. Yup,I don't have a za=
urus
>         yet.:)
>

I'm sure you can do this in vim, I'm just not sure how.
> Of course this is all a matter of personal taste.
> Just sharing mine here. Hope you don't mind.

Yep, it really boils down to the fact that any decent programmers editor=20
should work for python. You like nedit, i like vi, some people like IDLEs=
=20
editor. Heck, some people even like emacs. Just depends on what you need =
and=20
are used to, I guess.

--=20
mnavarre@anteon.com           Matthew Navarre
It was a hard sell, since he's a database person, and as far as I've seen=
,
once those database worms eat into your brain, it's hard to ever get
anything practical done again. To a database person, every nail looks
like a thumb. Or something like that. - jwz