TextMate to BBEdit switchers guide?

779 views
Skip to first unread message

Alex Satrapa

unread,
May 5, 2011, 1:22:21 AM5/5/11
to bbe...@googlegroups.com
Apologies if this is off-topic.

In response to Marco's article "Text Editor Intervention"[1], I had a brief look around for articles about migrating to BBEdit from TextMate. Threads from this list I've seen in the past:

- Migrating from TextMate to BBEdit
http://v.gd/2j6R9w

- Moving back to BBEdit from TextMate
(this is especially useful to Ruby on Rails folks)
http://v.gd/NmXybB
http://www.idolhands.com/ruby-on-rails/bbedit-on-rails/

Are there any other resources that might be useful for potential switchers?

Alex

[1] http://chipotle.tumblr.com/post/5207966724/text-editor-intervention

PS: the BBEdit features I've been making extensive use of recently are filters (I run my Perl scripts through perl-tidy), clippings (not so much now that I'm maintaining rather than writing), ctags, counterpart overrides, and projects.

Watts Martin

unread,
May 5, 2011, 4:36:46 AM5/5/11
to bbe...@googlegroups.com
Alex Satrapa wrote:

> In response to Marco's article "Text Editor Intervention"[1], I had
> a brief look around for articles about migrating to BBEdit from TextMate.

That's actually my article -- Marco reblogged it. :)

I don't think migrating is that difficult these days, although there are
still some differences in both implementation and philosophy. Most of
those are nitpicks, although a couple are real stumbling blocks for me.
(No automatic typing pairs is a nitpick, the inability for Codeless
Language Modules to reference one another is a stumbling block, and the
lack of "smart" indenting -- that is, syntax-aware -- is somewhere in
between.)

What I'd like to see is a guide for porting TextMate bundles to BBEdit.
Unlike a few of the other editors that have popped up recently, you
can't convert them directly, but I suspect a lot of them could be
rewritten as AppleScript. However, I doubt I'm alone in finding
AppleScript to be a *remarkably* impenetrable language -- this is a
project somebody else would have to take up. And most of the
publicly-available scripts for BBEdit are, well, pretty old; I get the
impression from this list that there's a *lot* more scripts out there
that you just kind of have to know about, or ask the right people for,
or what have you. Perhaps there should be a community-driven scripts
repository for BBEdit to encourage sharing and learning about this stuff.

--
Watts Martin <lay...@gmail.com>

Alex Satrapa

unread,
May 5, 2011, 8:19:32 AM5/5/11
to bbe...@googlegroups.com
On 05/05/2011, at 6:36 PM, Watts Martin wrote:

> Alex Satrapa wrote:
>
> > In response to Marco's article "Text Editor Intervention"[1], I had
> > a brief look around for articles about migrating to BBEdit from TextMate.
>
> That's actually my article -- Marco reblogged it. :)

I checked my links a few times, because something in the back of my head was yammering, "No, that's not right!"

Apologies for not catching the obvious problem :)

Alex


Robert Huttinger

unread,
May 5, 2011, 8:25:46 AM5/5/11
to bbe...@googlegroups.com
code indenting option would be nice...

bo



--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbe...@googlegroups.com
To unsubscribe from this group, send email to
bbedit+un...@googlegroups.com
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
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>

Gabriel Roth

unread,
May 5, 2011, 3:23:19 PM5/5/11
to bbe...@googlegroups.com
On Thu, May 5, 2011 at 4:36 AM, Watts Martin <lay...@gmail.com> wrote:
What I'd like to see is a guide for porting TextMate bundles to BBEdit. Unlike a few of the other editors that have popped up recently, you can't convert them directly, but I suspect a lot of them could be rewritten as AppleScript. However, I doubt I'm alone in finding AppleScript to be a *remarkably* impenetrable language -- this is a project somebody else would have to take up.

I'm not familiar with TextMate bundles, but it seems to me that BBEdit's Unix Scripts and Unix Filters menus might be an easier target than AppleScript for converting existing bundles—since for one thing they can be written in any language available from the shell. But I could be misunderstanding the situation in any number of ways.

I'd love to see more organized sharing of BBEdit scripts etc.

Dave

unread,
May 6, 2011, 9:37:47 AM5/6/11
to BBEdit Talk
On May 5, 3:23 pm, Gabriel Roth <gabe.r...@gmail.com> wrote:
> I'm not familiar with TextMate bundles, but it seems to me that BBEdit's
> Unix Scripts and Unix Filters menus might be an easier target than
> AppleScript for converting existing bundles—since for one thing they can be
> written in any language available from the shell. But I could be
> misunderstanding the situation in any number of ways.

I'm not familiar with TextMate bundles either, but one of the
advantages of AppleScript is in the area of user interaction. Shell
scripts can't pop open a file dialog, menu or even an OK/Cancel
prompt. (Don't even think about using /usr/bin/osascript to provide UI
from within a shell script you're going to run in BBEdit or any other
app.)

> I'd love to see more organized sharing of BBEdit scripts etc.

Me too. Bare Bones hosts a BBEdit Clippings Library and a Language
Module Library, but there are no user-contributed Unix Scripts, Unix
Filters, AppleScripts, Text Factories or Grep Patterns. Even the
Clippings and Language Modules don't seem to get updated with any
regularity. The great thing about sharing these, apart from saving
hours and hours of wheel-reinventing, is that they'd provide examples
for people who would love to use some of these features but just don't
have a clue how to go about it. (I'd think that might increase user
satisfaction, but what do I know?)

There are many isolated cases of fantastic resources like the BBRails
Toolkit, but there's no one place, as far as I know, to find and share
the broader spectrum of user-contributed BBEdit extensions.

Steve Kalkwarf

unread,
May 6, 2011, 10:53:46 AM5/6/11
to bbe...@googlegroups.com
>> I'd love to see more organized sharing of BBEdit scripts etc.
>
> Me too. Bare Bones hosts a BBEdit Clippings Library and a Language
> Module Library, but there are no user-contributed Unix Scripts, Unix
> Filters, AppleScripts, Text Factories or Grep Patterns. Even the
> Clippings and Language Modules don't seem to get updated with any
> regularity. The great thing about sharing these, apart from saving
> hours and hours of wheel-reinventing, is that they'd provide examples
> for people who would love to use some of these features but just don't
> have a clue how to go about it. (I'd think that might increase user
> satisfaction, but what do I know?)

Looking through my own scripts, there's nothing that strikes me as useful to anyone else, because they manipulate specific data into specific forms. Do you need a script to convert a block of code from using an XTException class to a different Exception? Probably not. In fact, I don't need it any more, either. But while I was doing that work, it was invaluable.

I've got other scripts that run various unix tools, and slam the document with the result. But how many examples of:

#!/bin/sh
/usr/local/bin/uncrustify -c ~/.uncrustify.objc -l OC -q -f "$1"

does the world need to see before the pattern is obvious?

I've always considered scripts, grep patterns, and text factories to be quick, throw away utilities to complete a specific task.

Clippings sets and language modules take a long time to develop, and have long-term value. Lots of people write php, or program in Erlang, so a php clipping set or Erlang language module serves a purpose beyond getting one job done.

At least that's the way I've always seen it…

Steve

Gabriel Roth

unread,
May 6, 2011, 12:36:00 PM5/6/11
to bbe...@googlegroups.com
On Fri, May 6, 2011 at 9:37 AM, Dave <dave.l...@gmail.com> wrote:
> I'm not familiar with TextMate bundles either, but one of the
> advantages of AppleScript is in the area of user interaction. Shell
> scripts can't pop open a file dialog, menu or even an OK/Cancel
> prompt.

According to the article that started this discussion, the same
restrictions apply to bundles:
"TextMate lets you write in any language you can script a Unix shell
with, from bash to Ruby.¹ The flip side of that, though, is that
TextMate’s bundles are—with few exceptions—limited to passing standard
input and environment variables to a shell script and getting standard
output back."
(http://chipotle.tumblr.com/post/5207966724/text-editor-intervention)

Watts Martin

unread,
May 6, 2011, 2:13:49 PM5/6/11
to bbe...@googlegroups.com
Gabriel Roth wrote:
> According to the article that started this discussion, the same
> restrictions apply to bundles:
> "TextMate lets you write in any language you can script a Unix shell
> with, from bash to Ruby.¹ The flip side of that, though, is that
> TextMate’s bundles are—with few exceptions—limited to passing standard
> input and environment variables to a shell script and getting standard
> output back."

Well, there are some clever ways around that, which are the "few
exceptions" I was thinking about -- TextMate has a library that lets its
scripts create dialogs for user interaction. And it actually offers a
pretty broad range of environment variables for scripts, and lets each
script define what it uses for input and does with the output, so you
can say "take either the current selection or the current document, pass
it to this script, and create a new document with it." BBEdit lets you
control some of that, but you don't actually attach those options to
scripts -- you set them globally. TM goes farther in making shell
scripting a "first class" way to write extensions.

Anyway, I would imagine -- I know I may be wrong! -- that there are more
AppleScripts and possibly even plugins out there for BBEdit that we
don't hear much about but that could be useful to people other than
their authors. Sure, the one-line shell script example probably isn't,
but what about, say, a set of scripts, clipping files and a CLM for
working with BBCode? (This example also brings up the notion of whether
there could be a way to package these as effective bundles, so you're
not dragging a half-dozen files to different places.)

--
Watts Martin <lay...@gmail.com>


Dave

unread,
May 6, 2011, 3:00:28 PM5/6/11
to BBEdit Talk
On May 6, 10:53 am, Steve Kalkwarf <kalkw...@barebones.com> wrote:
> Looking through my own scripts, there's nothing that strikes me as useful to anyone else,

That's your perception of your scripts, but, even if accurate, it says
nothing about scripts in general.

> I've always considered scripts, grep patterns, and text factories to be quick, throw away utilities to complete a specific task.

So you never save and reuse Grep patterns? I have so many that I reuse
that it's reached a point where it has become hard to find them on the
menu, even though I've gone through them periodically and renamed and
sorted them to make them easier to find. (I think it would be great if
they could be organized into hierarchical submenus.) My shell scripts
haven't quite reached that point, but a lot of them are very useful.
JSON messages are a lot easier to read if you can format them, and
it's a big help to be able to run all my JavaScript through jsLint and
jasmine tests before I try to check it in, and I imagine I'm not the
only person who would find those useful, and while they didn't take a
lot of time to write, some people might not even know where to start.
The really great thing is that a lot of these scripts need to be
tweaked before they'll work in a specific environment, and that's
often enough to give someone a feel for how things work and
encouragement to try writing a few scripts of their own. The bottom
line, of course, is that, if you are convinced that your scripts have
no lasting value, even as examples, you're welcome to keep them to
yourself.

Ryan Wilcox

unread,
May 8, 2011, 9:02:02 PM5/8/11
to BBEdit Talk
On May 5, 3:23 pm, Gabriel Roth <gabe.r...@gmail.com> wrote:

> I'd love to see more organized sharing of BBEdit scripts etc.

In the spirit of sharing, today I wrote a useful BBEdit Filter for
Rails. I put it up on Github.

Please fork it and add any Filters you use during your Rails
development, or if you have an idea how to make Rails development with
BBEdit better for you (which is what I did when I created said BBEdit
filter).

BBEdit Rails Filters: <https://github.com/rwilcox/
bbedit_rails_filters>

Hope this helps,
_Ryan Wilcox


Ryan Wilcox

unread,
May 9, 2011, 8:55:52 AM5/9/11
to BBEdit Talk
On May 5, 3:23 pm, Gabriel Roth <gabe.r...@gmail.com> wrote:

> I'd love to see more organized sharing of BBEdit scripts etc.

(I tried to send this message earlier, but I guess it didn't get
through. Sorry if it's a repeat)

I started a Git repository for my Rails related BBEdit filters:
<https://github.com/rwilcox/bbedit_rails_filters> - I would love it if
others contributed their Rails related FILTERS.

The nice thing about TextMate is that the clippings/filters/etc etc
for a technology are grouped into a bundle. Download the Ruby on Rails
bundle and you get everything you might want. BBEdit instead groups
things by what they are... so there almost needs to be a repository
for Rails related Unix Scripts, Rails related clippings, Rails related
Applescripts...

Anyway, check out my filter: it makes Open Counterpart useful in Rails
projects :)

Tim Gray

unread,
May 10, 2011, 11:05:16 AM5/10/11
to BBEdit Talk
On May 09, 2011 at 05:55 AM -0700, Ryan Wilcox wrote:
>The nice thing about TextMate is that the clippings/filters/etc etc
>for a technology are grouped into a bundle. Download the Ruby on Rails
>bundle and you get everything you might want.

Maybe we could put in a request to BareBones to think up of some kind of
bundle handling in BBEdit so we could drop a folder full of
AppleScripts, unix scripts, language defs, etc., into the appropriate
folder and BBEdit would do the right thing.

Personally, I've used BBEdit for the last 10 years almost daily. I love
the application, but poking around the TextMate and vim communities show
me how a robust extension mechanism and community repository can really
make a difference in the usability of an application. If you think
TextMate has a lot of extensions for it, you should see the community
that vim has build around it. And some of the plugins are really quite
amazing and elegant too. Like the one that let's you put a cursor over
a date/time (in any one of about 20+ formats that are user extendible)
and hit ^A or ^X to increment the date up or down. Cool extensions
like this *could* be written for BBEdit, and maybe they even exist out
there, but I've never really seen them... The only two real extensions
I've seen written for BBEdit in this spirit are the CompileTeX scripts
for LaTeX and BBAutoComplete.

Reply all
Reply to author
Forward
0 new messages