[Pythonmac-SIG] Re: BBEdit questions (Russell E Owen)

Chris Barker Chris.Barker@noaa.gov
Thu, 02 May 2002 16:19:51 -0700


Russell E Owen wrote:
> 
> (I included copies of my message to the author of Pepper and to the BBEdit folks. The former responded directly to the list. The latter gave me permission to forward their reply.

It's nice to see that the providers of both BBEdit and Pepper are
responsive, although I have to say that the replies from John appeared
to be all of the "I already know my program is perfect, so I'm going to
try to justify all of its features" nature. That makes me think that
there is really no point in trying to further explain the issues, but in
case someone want to...

> > >Worse, it doesn't know that the tabs expanded to four spaces, so
> > >when you have to backspace, so you have to backspace once for each
> > >space.

> If you're using spaces, and you want BBEdit to delete four spaces at
> a time when you hit the delete key, how would you delete only *one*
> space if that's what you wanted? We try to avoid features like this,
> where the program tries to be smarter than you, because it's more
> frustrating to workaround it than the problem it originally tried to
> solve.

I don't want the program to be smarter than me, I just want it to be
smart. What we are requesting is NOT: "re-define the tab key to insert
four spaces, and redefine the delete key to delete four spaces"
(althought I'd like to be able to do that IF I wanted!). What we want is
smart indenting:

-re-define the tab to key to mean: indent this line "correctly" This
would match the previous line in most cases, and add a level of
indentation if you were starting a new block. In Python, a new block is
started after a colon, and in other languages it is defined in various
other ways.

-re-define the delete key to mean: detent this line one level, if the
cursor is in the white space at the beginning of the line, otherwise
delete a single character as usual.

-In both cases, the user should be able to define what they want an
indent level defined by: nspaces, a tab, whatever.

This is pretty much how Emacs works in many modes, not just Python mode,
and I have NEVER had a problem with it. There is never a reason to
delete just one space when you are in the whitespace at the beginning of
the line, in any language. If you have some wierd need, you should, of
course, be able to turn smart indent mode off.

If they really don't want to do it, how about shift-delete or something
deleteing an indent level

How is this kind of customisation done in BBEDit? is there some sort of
nifty Macro language so that we could do this ourselves? or are all
these features hard-coded into the main source, so that Bare Bones has
to do it?

> Try using BBEdit's Entab and Detab commands when you open and save
> your files. (In the Text menu.)

This does look handy, if you set tab width to 8 spaces, all should be
fine. 
 
> We're aware of this limitation, I believe syntax checking for Python
> is already slated for a future update.

great! It is nice to see that they are trying to support Python.
 
> It makes no logical sense for both Wrap Around and Only Search
> Selection to be turned on; you can't wrap around the selected text.

> > - The find/replace dialog box is modal. In this day and age? That's
> > taking "bare bones" too far! (Pepper does this right).

I have to agree with Russell on both of these. Modal Dialog boxes should
be kept to an absolute minimum. At least OS-X doesn't have all those
darn system-modal dialogs!

So, it sounds like Pepper may be a better option. Does any one know if
it has:

1) soft-wrap of text. I really apprechiate this in BBedit
2) rectangular region cut and paste I use this all the time in Xemacs.
What it means is that you can for example, cut and paste the first four
columns of text.
3) easy dealing with mac/unix/dos line endings.
4) show invisibles

Also, does either BBedit or Pepper's Python mode have a good:

Indent/Detent region

comment/uncomment region

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer
                                    		
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker@noaa.gov