[Pythonmac-SIG] Re: BBEdit questions

Russell E Owen owen@astro.washington.edu
Wed, 1 May 2002 08:54:49 -0700

Kevin Altis <altis@semi-retired.com> wrote:

>I'm in the process of evaluating BBEdit as a Python editor...
>I would like to change the default colors being used for syntax coloring but can't find the dialog. Does that have to be changed manually in a file on disk and if so where?

I don't know of any way to do this.

>Auto-indent seems pretty dumb, I have to tab after typing a colon and Return so it apparently doesn't understand blocks. If there is a setting for this, I would like to change the behavior.

Alas, this is true. I don't believe BBEdit has "smart" indent for any language. Auto indent just means that when you hit return, the indent matches the previous line. Smart indent would be great! It would show me right away when I omitted a ":" (one of my more common mistakes).

>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. That is sort of annoying, any workarounds besides always using tabs instead of spaces?

I agree this should be fixed. However, as somebody else suggested, just use tabs. You can pick how many spaces a tab is worth, and you can always turn tabs into spaces later if you want to (i.e. if you are writing code that MUST be in spaces because GvR insists).

>Check syntax under the #! menu always complains with an error "The front window isn't in a scripting language BBEdit currently recognizes (application error code 30001)."

Yeah, same here. I hadn't noticed this before. That's worth a bug report.

BBEdit definitely has its weaknesses. BB stands for Bare Bones, and I think that's part of the problem. My own pet peeves include:
- The range checkboxes in the find/replace dialog box. Some have to be unchecked before others can be checked. Hence I can't just leave "wrap" checked all the time and check "in selection" when I need it. (Pepper does this right. I am really confused why the BB haven't fixed this.) I should try to write a script to put it in the desired state.
- The find/replace dialog box is modal. In this day and age? That's taking "bare bones" too far! (Pepper does this right).
- The main tool for commenting and uncommenting code TOGGLES the state based on the first line in your selection. This can be unpleasant when you are trying to temporarily comment out a block of code that starts with comments. I wrote a pair of scripts <ftp://ftp.astro.washington.edu/pub/users/owen/Comment%20Lines.sit> so I could be explicit about what I'm trying to accomplish ("explicit is better than implicit").
- File browsers (including the one put up by "Find All") don't allow editing of file contents. (Pepper does this right). I attribute this to the "bare bones" aspect, but perhaps they may implement it someday.

Some others I've used include:
- Qued was a wonderful text editor -- ahead of BBEdit in its day in some important ways (such as multiple undo). But Nisus stopped supporting it when BBEdit got popular. You can probably still buy it, but I wouldn't bother unless they've updated it.
- Alpha is powerful and incredibly extensible. But I find it really cluttered. Also, every time I've tried it I've somehow managed to get it into modes where text entry doesn't work right (presumably some configuration got twisted or some weird script accidentally got run). I didn't want to spend the time to try to get it straightened out and reconfigured to my taste.
- Pepper has some very nice features, but is behind BBEdit in some important areas, including being able to run scripts. I own it, and really hope a major update of Pepper materializes someday.
- NEdit (a free X-based editor). I'd use it if I had nothing better, but X is clumsy if one is used to Mac and NEdit isn't particularly powerful.

BBEdit isn't perfect, but it is what I use at present. It has powerful find/replace (including excellent multi-file find/replace), handles files with different line endings (indispensable in the schizoid MacOS X world of Mac/unix line endings), handles huge file, and is robust. I also find it pleasant to use, with a nice balance of power and simplicity.


-- Russell