Arbitrary Keybindings in BBEdit

493 views
Skip to first unread message

Christopher Finazzo

unread,
May 10, 2013, 10:52:53 AM5/10/13
to bbe...@googlegroups.com
I sent this message to Bare Bones Support earlier this morning, I am replicating it here for the purpose of general discussion.

Is there a reason why BBEdit does not support arbitrary keybindings for inserting snippets or autocompletion of text. Moving to BBEdit from Coda, this was a feature that I made extensive use of and cannot (at least in the application's default configuration) seem to replicate this behavior. BBEdit's User Manual specifies that either the Command key or the Control keys be when creating a shortcut and can only be used along with other modifier keys (Option, Shift, etc.) when assigning a custom keybinding. 
Is this behavior intentional, and if so, what is the reason for it? I would much rather be able to assign a short name and then be able to press Tab in order to complete a tag or other block of text. 
For example, one could assign "HTML" to the default clipping for an HTML5 doctype and use it to quickly create a base layout for a page. As it stands, Keyboard Shortcuts (and by extension, Clippings) are of limited use because they require cumbersome modifier keys in order to activate. 
Does Bare Bones have any plans to adopt such a feature in the future? It would go a long way to encouraging people to make use of keyboard shortcuts to improve their daily workflow.

Kevin McKenzie

unread,
May 10, 2013, 11:11:42 AM5/10/13
to bbe...@googlegroups.com
While not exactly a response to your question, have you looked at something like TextExpander, BetterTouchTool, and so on?  TextExpander especially is incredibly powerful, letting you nest expansions, include Applescript or shell scripts as part of an expansion, and much else.

Sent from my iPad
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
 
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
To post to this group, send email to bbe...@googlegroups.com.
 
 

Fritz Anderson

unread,
May 10, 2013, 11:24:29 AM5/10/13
to bbe...@googlegroups.com
On 10 May 2013, at 9:52 AM, Christopher Finazzo <chris....@gmail.com> wrote:

> Is there a reason why BBEdit does not support arbitrary keybindings for inserting snippets
...

I have key equivalents in my clipping sets for TeX and Markdown. I hit opt-cmd-B, and the selected text (or the insertion point) is wrapped in **.

You do it through the Clippings palette (Window > Palettes > Clippings). Select the clipping that interests you, and click Set Shortcut (ugh) to open a field that will accept your key equivalent.

— F

--
Fritz Anderson
Xcode 4 Unleashed: 4.5 supplement for free!
http://www.informit.com/store/xcode-4-unleashed-9780672333279

Oliver Taylor

unread,
May 11, 2013, 12:17:27 AM5/11/13
to bbe...@googlegroups.com
On May 10, 2013, at 7:52 AM, Christopher Finazzo <chris....@gmail.com> wrote:

I would much rather be able to assign a short name and then be able to press Tab in order to complete a tag or other block of text. 

This is provided by BBEdit's auto-complete function. Type the clipping-name then select from the menubar "Edit > Complete" (which you can assign a shortcut to). See page 93 of the user manual. This works for clippings (which can contain scripts), ctags, dictionary words, and words elsewhere in the document.

Is that what you're talking about?

Christopher Finazzo

unread,
May 13, 2013, 4:13:41 PM5/13/13
to bbe...@googlegroups.com
Yes. From my conversations with Patrick from Bare Bones, it seems that it is simply a philosophical argument about what keys are allowed to be used for the autocomplete function. "Tab" seems like the logical choice, but as it's already used by many other functions, which might be problematic for people. From what I understand, this isn't the first time that this request has come up.

Christopher Finazzo

unread,
May 13, 2013, 4:16:14 PM5/13/13
to bbe...@googlegroups.com
In an ideal scenario, I wouldn't have to use modifier keys (Command, Option, etc.) at all in order to invoke the clipping. It just seems odd to me that autocomplete is "pigeon-holed" into this relatively limited way of doing things...

Christopher Finazzo

unread,
May 13, 2013, 4:24:21 PM5/13/13
to bbe...@googlegroups.com
I've tried them, but the whole idea of these kinds of text expansion apps just doesn't appeal to me. If I'm thinking about it objectively, I can see there is a use case for some people, but that's not me.

If someone can find out how to sell this idea to regular people, maybe it would catch on outside of our circle of nerds, but I can just as easily see someone look at it and dismiss it without a second thought ("Text expansion is for wimps, just type" etc.)

Kevin McKenzie

unread,
May 13, 2013, 4:38:25 PM5/13/13
to bbe...@googlegroups.com
Hi.  I guess I'm a bit confused, then.  I can understand why test expansion and the like wouldn't appeal to some people, but for solving your particular problem, TextExpander would work.  You could tell it, for example, that if you typed HTML in bbedit, and then followed it with a chosen demarcation keystroke (space, tab, etc), it would expand into the base layout for the page.  It's not quite as clean as doing it in the application, I'll admit, and it's not always foolproof, but it would address your particular concern.  Similarly, with Keyboard Maestro, Dash, and so on, you could do something similar, but somewhat differently.

Kevin McKenzie

John Delacour

unread,
May 13, 2013, 6:36:17 PM5/13/13
to bbe...@googlegroups.com
On 13/5/13 at 21:16, chris....@gmail.com (Christopher
Finazzo) wrote:

>In an ideal scenario, I wouldn't have to use modifier keys
>(Command, Option, etc.) at all in order to invoke the clipping.
>It just seems odd to me that autocomplete is "pigeon-holed"
>into this relatively limited way of doing things...

I don't think typing control-tab is any more cumbersome than
typing tab. Think of the apps (XCode) where you can use just
tab to autocomplete : what other options do you have for
assigning key shortcuts in them? BBEdit is exceptional in
allowing you to do practically anything with key shortcuts and
even to customize the standard shortcut keys. I think you're
making a mountain out of a molehill.

JD

Steve Samuels

unread,
May 13, 2013, 9:20:11 PM5/13/13
to bbe...@googlegroups.com
Take a look at bbautocomplete .

Watts Martin

unread,
May 14, 2013, 7:44:42 PM5/14/13
to bbe...@googlegroups.com
Christopher Finazzo wrote:

> If someone can find out how to sell this idea to regular people, maybe
> it would catch on outside of our circle of nerds, but I can just as
> easily see someone look at it and dismiss it without a second thought
> ("Text expansion is for wimps, just type" etc.)

Text editors like BBEdit (and Sublime Text, Vim, Emacs, etc.) only
appeal to a circle of nerds in the first place.

Quasi-seriously, I think BBEdit often seems to be of the opinion that
shortcuts are for wimps in general. I'm pretty sure that things like
auto-pairing and syntax-aware indenting have been requested for years
and rejected, and discussions about it tend to show two rather
black-and-white standpoints on the subject that boil down to "those are
the best things ever" and "those are crutches that get in the way."

Rich Siegel

unread,
May 14, 2013, 8:41:05 PM5/14/13
to bbe...@googlegroups.com
On Tuesday, May 14, 2013, Watts Martin <lay...@gmail.com> wrote:

>Quasi-seriously, I think BBEdit often seems to be of the opinion that
>shortcuts are for wimps in general.

BBEdit is a software product and is not sentient. :-) You may be
thinking of Emacs, which has Lisp built into it and is therefore
self aware.

>I'm pretty sure that things like auto-pairing and syntax-aware
>indenting have been requested for years and rejected, and discussions
>about it tend to show two rather black-and-white standpoints on the
>subject that boil down to "those are the best things ever" and "those
>are crutches that get in the way."

I can't speak to what other people think, but I'm of the opinion
that a great many language-sensitive features are extremely
tricky to get right, and I'd rather do it right than do it
half-assed. Even then, doing it right may involve making
tradeoffs that I would prefer not to make, and therefore I will
opt for not doing it at all rather than doing something half-assed.

R.
--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they
sedate me.

Christopher Finazzo

unread,
May 15, 2013, 10:30:40 AM5/15/13
to bbe...@googlegroups.com
Watts, 

I do agree with you that some of the features we've been discussing have likely been asked for many times, but Bare Bones is reluctant to add them for the reasons you mention. I remember trying Textmate several years back (before having tried BBEdit, had only seen others use it) and finding that if you go too far in the direction of "context-aware" features, 2 things happen: 

1. Performance suffers.
2. There's too much "magic" going on, and people get frustrated (I want what I typed to appear on the screen and nothing else, there's no reason to try to read my mind and "help me" by adding things that I don't always want).

My motivation for bringing this up is mostly because it's a decision that was seemingly made not for technical/performance related reasons and unless I'm missing something, it doesn't seem like it would require that much effort to configure keyboard  shortcuts to behave in this way.

Christopher Finazzo

unread,
May 15, 2013, 10:48:42 AM5/15/13
to bbe...@googlegroups.com
Thanks for weighing in on this Rich, always interesting to hear from the man himself.

It seems like I and the others on this thread do have Emacs or any number of similarly configurable text editors in mind when we're asking for a feature like this to be considered. It's very clear that BBEdit is "opinionated" in a way that Emacs in particular, isn't. The mantra there (among Emacs users) has long been "If you can do it in a text window, go right ahead, it's not up to us".

As I've said at times throughout this discussion, it may be (as you point out) that other things would have to change in order for the keybindings to be configurable in this way. Coming from primarily a web background, I don't have nearly enough experience with Objective-C to know if this is the case, but it  is the best guess I can make at this point.

From my support emails with Patrick, it appeared initially that this was a philosophical decision, not driven by technology. However, I realize now that the reality is a bit more nuanced than that. It would be a welcome addition at some point, but I wouldn't want that to take away from any effort to keep BBEdit as fast and reliable as it is.
Reply all
Reply to author
Forward
0 new messages