Subscribe to
NSLog(); Header Image

BBEdit Needs Auto-Complete

BBEdit needs auto-complete. You know how many times in a day I type <a href="/products/pulpfiction/resources/"? Too many. Especially when I'm editing a list and the only difference in each item is what follows that last "/" and the thing in title="". If BBEdit 7.5 had nothing more than a solid auto-complete implementation, I'd buy it.

10 Responses to "BBEdit Needs Auto-Complete"

  1. BBEdit also needs full keyboard access to all of the controls in its dialog boxes! It's crazy that a text editor as powerful as BBEdit can't be more easily navigated from the keyboard.

  2. I haven't seen it for a while, but I know there's a 3rd-party implementation of autocomplete for BBEdit. It uses an applescript and a separate application - the applescript feeds the document to the application, the application parses it and then sends back the autocomplete to BBEdit. At least, that's how it works IIRC.

  3. Yeah, BBAutoComplete does it, but I'd like one built in.

  4. BBEdit needs a lot of things to really be the premier web development tool. It merely is the best among its peers. I used to code ColdFusion years ago, and Homesite/ColdFusion Studio really were the best applications I've ever used for web development. The auto complete (not quite like you are looking for) for tags and functions was really good. It helped, but when you were doing something different or didn't want it, it was quick to get out of the way and let you code. IIRC The color coding was great and caught everything (putting PHP inside of style tags for instance). Dreamweaver is too much bloat for what I need. Don't even get me started on how the Mac version just doesn't work right, its not the windows version, its not a mac version, its some bastard version of anti-productivity. I got and tried SkEdit, but the nazi autocomplete and other little nuances have me using BBEdit primarily again. I would really love to see BBEdit continue to embrace the web developers seeing as that is what I am. Near as I can tell that has been their primary focus in recent history. I am thinking of jumping in and learning Objective C and Cocoa and writing my own thing with the help of my cousin who is finishing up his computer science BS, cause no one seems to have gotten it right yet.

  5. You might also want to take a look at skEdit with auto completion feature.

  6. Actually, it has a form of auto completion, I use it every day. It's called Glossaries, and you can make your own. I made a few, for XSLT, Perl and for Java/JSP for example. There are tons of others, e.g. for PHP, HTML etc.

    Glossaries end up in a small palette and they have a title. You type the first few characters of a title and then invoke the "Complete Glossary" menu command, which you should of course assign to a keyboard shortcut. I use Ctrl-Return which works great and "feels" right.

    So when I'm editing Perl code and I type "su" or "sub" or "subroutine" etc. and hit Ctrl-Return, BBEdit replaces the word with the following snippet:

    sub xyz {

    my (#*#) = @_;

    return undef;


    Note that it will also place the cursor where I have to type the subroutine name, i.e. where I typed xyz now. Next, note the placeholder sequence in the parens after "my". That is the next place holder and I can immediately go there using Cmd-Alt-Right Arrow and begin to type stuff there, in this case the parameter list. You can have as many such placeholder targets as you need.

    There are many more special control codes you can insert into the glossaries, for example to include the current date/time, filename, even execute applescript or other stuff. It gets very dynamic, more so than auto completion.

    For your particular example, you could create a glossary entry like this

    <a href="/products/pulpfiction/resources/#INSERTION#" title="#INSERTION#">#INSERTION#</a>

    Give it a nice glossary entry title like "prodlink" and you're all set. Just type "prod", hit Ctrl-Return and your cursor will be placed right after the last /, ready to accept your input.

    What's a bit different from regular completion is that you can't start with something like "<a href" and then initiate completion, it really works with the item titles. This can also be a benefit, however, as it allows you to control the sequences you have to type, so you can give shorter titles to more often-used items.

    If more than one title matches, a popup will be presented.

    P.S.: Note that BBEdit also has a *very* useful tag-completion feature for HTML or XML. I assigned Cmd-Return to that function, it is *invaluable*.

    So my recommendations for the shortcuts you need to assign are:

    Ctrl-Return: Edit -> Auto Complete Glossary

    Cmd-Return: Markup -> Close Current Tag

    Cmd-Alt-Right-Arrow: Search -> Go To Next Placeholder

    Cmd-Alt-Left-Arrow: Search -> Go To Previous Placeholder

    PPS: Are there no trackbacks on this blog? I would have liked to post this as trackback so it ends up in my own shiny brand new blog 🙂

  7. I use the glossary too - quite a bit - but the nice thing about auto-complete is that it works on new pages that you're editing transiently (and, it has the same keyboard shortcut: something glossaries really don't).

  8. I agree with you Erik. For the kind of $ BBedit costs, it needs auto-complete, better css support. and keyboard dialogue access. No doubt it is powerful software which can do many unique things, but I just want something that works out of the box. I'm too busy to spend time writing glossaries and remaping shortcuts just to get this app to work 75% as well as Topstyle. Nothing I've tried comes even close to Topstyle or Homesite. I'm seriously considering running Topstyle under virtualPC.

    FYI -- there's a rich discussion on the BBedit issue over here.


  9. I'll chime in that I REALLY REALLY want autocomplete in BBEdit.

    I am a WebObjects developer, but currently work primarily in PHP. BBEdit has become my editor. In ProjectBuilder, I had a large library of auto completions. With autocomplete bound to [ESC] and next-field (a feature of a ProjectBuilder plugin called ODCompletionDictionary) bound to [F8], autocompleting was touch typable and very very fast.

    The problem with the completion autoscript is that it's too slow, and interrupts the flow of typing, and it can't be bound to [ESC].

    I really like BBEdit, particularly its search/replace dialogue which totally rocks, but I miss autocompletion sorely.

  10. I agree with Marc about Glossaries being nearly the same as auto-completion, but I understand how you (and others) feel. The interface isn't the best, but it is completely navigable from the keyboard. My usual approach is to type the first few letters of a function and then Command+Option+k (for Keyword) to see a list of matches from the currently active glossary. I can then use the keyboard to navigate the list and hit enter when I've reached the one I want. I've got a great PHP glossary if people are looking for one: BBEdit PHP Glossary