>I'm developer/writer who has, historically, been a vim (MacVim,
>specifically) user who is investigating other editors that have a bit
>better integration with OS X. The majority of my work is editing HTML/
>XML, Python and PHP as well as writing a fair bit of regular old
>English prose.
Sounds like a good fit so far. ;)
>If somebody asked me why I use vim, I'd tell them it's because you can
>configure it to do just about anything you want, you never have to
>touch the mouse and there is a vibrant, active developer community
>surrounding it that has built all manner of customizations for it.
>
>If I asked a TextMate user why they use it, they'd probably tell me
>about all the stuff that can be done with Bundles and snippets (there
>may be more, I don't really know).
>
>If somebody asked you, my new friend, why you use BBEdit, what would
>you tell them?
It's hard to speak in generalities, but you can certainly do a lot
with the keyboard in BBEdit. You can script text processing in Perl
or AppleScript (etc.; I assume Python as well) and assign it a
keyboard shortcut, you can script a workflow helper thing in
AppleScript (have you viewed the AS dictionary in BBEdit? It's quite
comprehensive), and of course lots of other people have processing
thingies (er, scripts; I'm tired) available.
>Thanks for your time and please tell me if there's anything I can add
>or clarify that would make my question easier to answer.
Well, anything more specific. If there's something particular about
vim which you are hoping exists or can be simulated in BBEdit, just
say what it is and folks will respond to that specifically. I don't
know how long you've been reading this discussion list, but if you've
perused enough you'll know that it's a helpful community always at
the ready to provide tips, tricks, code, etc.
-boo :)
BBedit worksheets are the only reason I switched.
Apple's MPW, Macintosh Programmer's Workshop, was never ported to OS 10 and BBedit was the only option that attempted to recover the MPW shell, a text editor that allows execution of commands by selecting and entering - with a mouse - lines of text within the document. The meanings of the ENTER and RETURN keys are different.
I still prefer to use MPW on this OS 9 box but BBedit remains the only command line in the text file option for OS 10. It's not perfect and I have a bunch of complaints but it's better than nothing.
--
--> There are 10 kinds of people: those who understand binary, and those who don't <--
> If somebody asked you, my new friend, why you use BBEdit, what would
> you tell them?
Let me start by stating that I'm biased. I liked the product enough to relocate my family cross-country to work for the company. That said…
BBEdit is a mature product, and it has many features that even I don't use. Here are a few things about BBEdit that I like that may appeal to you. There are entire swaths of product I'm not even going to mention, so if this list doesn't inspire you to join us, maybe someone else's will. :-)
Many useful transformations are built in (see the Text" menu). "Process Lines Containing: is one of my favorites. You tell it how to find lines, and then you can delete them, extract them to a new document, count them, or any combination of those. It also sorts (optionally using regular expressions to locate the portion to sort on), does case changes, and many other transformations. If you need to repeatedly perform a series of transformations, you can configure a Text Factory describing the transforms, and then apply _that_ to the text directly.
It has a very fast, flexible search and replace engine. It can be used in single files, or across multiple files grouped by folder, project, etc. It optionally supports regular expressions, and file filters, to avoid searching in files that match a particular pattern.
BBEdit supports "clippings", which are bits of text that optionally take context, and perform substitutions and replacements. For (a bad) example, consider a clipping containing these text and tokens:
<em>#selectionorinsertion#</em>
If you apply it to an empty selection, you get
<em>(the blinking insertion point)</em>
If you apply it to selected text, it surrounds the selection with the <em></em> tags.
This is a trivial example, but if you look in the manual (starting on page 259 -- Wait! Did I mention that it has a manual?), you'll see other tokens which do much more, including #script# and #system#, which are really powerful.
It's tightly coupled with the OS. You can use Automator to access BBEdit's text transforms, or AppleScript to manipulate text or shuttle data between documents, or control BBEdit itself.
If you spend much time in the shell, we provide command line tools to perform edits, diffs, and searches. I have mine configured as my $EDITOR.
You can run shell scripts directly from BBEdit, and get the results in BBEdit as well. Ruby, perl, and python also have syntax checker support.
You can write tiny shell scripts that can be applied to documents, or selections within the document.
BBEdit can easily read and write files owned by the system.
It has support for Subversion and Perforce built in.
It has a lightweight FTP and SFTP client built in, and integrates well with Interarchy and Transmit if you need better control over your transfers.
There's an awesome community of users here who are very willing to share solutions, or brainstorm problems with you.
And there's a 30 day demo available.
Hope this helps,
Steve
Personally, if BBedit had a “vi mode” allowing the use of the legacy vi keystrokes in a document window, I might use it sometimes, but I'm generally glad for the greater consistency of the GUI mode, coupled with an otherwise satisfactory editor. (I still do use vi sometimes, and of course I have my shell set to « -o vi ».)
Greg Shenaut
As someone who is using more Vim nowadays (MacVim is pretty nice), I
would probably abandon it completely if BBEdit had a Vim mode.
Especially one that included word and sentence motions...
>If somebody asked me why I use vim, I'd tell them it's because you can
>configure it to do just about anything you want, you never have to
>touch the mouse and there is a vibrant, active developer community
>surrounding it that has built all manner of customizations for it.
That's one of the main reasons I use BBEdit, and I'd bet that if you
can do something one way in vim, you could do it that way and a dozen
others in BBEdit, because you have UNIX scripts to manipulate the
text (or AppleScript if you like extreme verbosity) and AppleScript
to make connexions and control aspects of the interface. To run
these scripts you can, in order of clumsiness, a) select them from a
menu, b) click on them in a palette and c) assign a keystroke to the
script and run it from the keyboard. This is how a good Mac
programme should be and how good Mac programmes used to be. There
are very few of these left. Eudora is one of them and Nisus is
another, but Lion users have to say goodbye to Eudora. I say goodbye
to Lion.
BBEdit was, for a long time, an American geek's editor and was slow
to adopt such important things as Unicode, limping on for long time
with an obsolete text engine. Some years ago that all changed. As
regards the scriptability of BBEdit, there is very little wanting.
In my opinion, to use a UNIX editor on a Mac is like running a
four-cylinder engine with one spark-plug. With BBEdit you have full
access to the UNIX things, and full access to the Mac things through
AppleScript.
JD
>As someone who is using more Vim nowadays (MacVim is pretty nice), I
>would probably abandon it completely if BBEdit had a Vim mode.
>Especially one that included word and sentence motions...
What do these motions achieve? Something that cannot be achieved
with scripts/keystrokes in BBEdit. I doubt it, but am always ready
to be enlightened.
JD
CLAP, CLAp, CLap, Clap, clap, claP, clAP, cLAP, CLAP!
= = = = = = = = = = = = = = = = = = = =
On Jul 28, 2011, at 7:11 AM, Steve Kalkwarf wrote:
> On Jul 27, 2011, at 11:49 PM, Brett Kelly wrote:
>
>> If somebody asked you, my new friend, why you use BBEdit, what would
>> you tell them?
>
> Let me start by stating that I'm biased. I liked the product enough to relocate my family cross-country to work for the company. That said…
>
>
<snip>..</snip>
Can we use BBEdit to compose email in Mail.app? :-)
I use mutt for much of my email in no small part because I can also use
vim for composition.
Composed in vim, sent with mutt, via ssh and Postfix, using
Terminal.app.
--
David Kelly N4HHE, dke...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.
> --
> 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>
I think it's just that there are some extremely compact, useful sequences that become automatic for vi users. Things like “xp”, “5xwep”, “d3w”, “dL", and so on. Yes, of course all these things can be done in BBedit, that's not really the point. And of course if you don't already have them “in your fingers”, then there would be no reason to try to learn them. It's more that once you've become fluent in vi (or any other highly keystroke oriented program), using those compact sequences becomes second nature and is easier and more efficient than sequences that involve highlighting with a mouse, invoking a contextual or menu-bar menu item, or even Command+key sequences.
Greg Shenaut
The ability to delete or copy a sentence or word or paragraph or the
inner contents of a set of delimiters with a couple of keystrokes. You
can also perform the action around the above structure, i.e. including
the quotes or spaces around the word. It works like this: putting your
cursor on a sentence and typing 'das' will cut the full sentence
including the spaces around it. If you have arguments in parenthesis
that you want to replace, typing 'di(' will remove the contents, but not
the parenthesis. The command breakdown is as follows:
- d - delete
- a or i - around or in. includes the spaces around the
word/sentence/block or delimiters if 'a' is used, or does not include
them if 'i' is used
- w,s,p,',",(,etc. - the block of text to operate on. sentence,
paragraph, word, quoted text, text in parenthesis, brackets, etc.
Of course, the whole thing about a modal editor like Vim is that you
don't have to do all kinds of crazy key combos like command-control-key
to run your command. I'm sure you could write a ton of applescripts to
semi simulate the 'in' and 'around' motions that act on logical text
units, but the long and short of it is that if it's not a modal editor,
you can't string simple single letter commands together like you can in
a modal editor.
Sorry for a rushed explanation. If you have more questions I might be
able to respond more thoroughly and coherently later tonight.
1) It’s never crashed on me (well, once, when something stealth installed APE, but I don’t count that). Considering how much work I do in BBEdit this is a *HUGE* advantage.
2) It doesn’t suck. (No, really, this is so rare that it’s worth mentioning).
3) Full and complete regex support. I’m no regex expert by any means, but I use a subset of regex all the time, every day. Being able to access the history of the regex expressions I’ve used is nice as if I mistype something I can go back and fix it instead of starting all over like I do with vim/MacVim.
4) Setup command keys the way you want and attach scripts to any command. I’m not doing this presently, but I did it in the past and it is extremely powerful.
5) Shell worksheets allow me to use the BBEdit text tools on, for example, lists of filenames. I do this a lot. It’s a lot simpler than with MacVim.
6) HTML tools are brilliant and make coding pages a lot easier (this is why I bought BBEdit, though nowadays I do a lot less of this than I did).
7) LaTeX integration
8) no-regex power. Text menu, prefix/suffix lines is stupidly useful. A lot of times all I want to do with a large block of text is, for example, add <li> to the start and </li> to the end. In BBEdit I don’t need to write a albeit simple regex, it just does it.
9) All the stuff I don’t use, like Projects, Scripts, Text-Factories, and Clippings.
I use MacVim a lot as well, and have been using some version of vi for more than 25 years now (egads!), but when I can, I use BBEdit instead.
--
when you're no longer searching for beauty or love, just some kind of
life with the edges taken off. When you can't even define what it is
that you're frightened of...
>Can we use BBEdit to compose email in Mail.app? :-)
Of course you can, provided you are prepared to suffer using Mail.app
at all and tolerate its very stupid scripting dictionary. You can
also do it using less awful mail clients.
>I use mutt for much of my email in no small part because I can also use
>vim for composition.
>
>Composed in vim, sent with mutt, via ssh and Postfix, using
>Terminal.app.
What a palaver! You could do all that directly from BBEdit or use
Mailsmith, which is just as scriptable as BBEdit, or use BBEdit and
Eudora, but why you would want to complicate things rather than use
a mail client that is designed for the task I can't imagine.
Suppose I need to send email in classical Greek or Thai using Eudora,
which doesn't allow real Unicode input. I write the message in
BBEdit ot TextEdit, then run a script (= type a keystroke) and send
Apple events to Eudora to get the message as utf-8, create a message
containing this and send it as "...charset=utf8". If I want to send
it using Postfix, no problem. It can all be done with a single
script that can offer whatever options you please.
JD
Yes.
<http://www.hogbaysoftware.com/products/quickcursor>
I use BBEdit to post to USENET, but I don’ use it with Mail.app (there are a few issues in Lion mail with it, such as quote markers getting stripped)
--
Carlin's Third Commandment: Thou shall keep thy religion to thyself.
Well, if you learn the hated emacs keys, OS X supports those in all sorts of places. I use ^t all the time (xp in vimspeak).
Here are the ones that are built-in to OS X, though BBEdit may support more:
^A move to the beginning of the paragraph
^B move backward
^D delete forward
^E move to the end of the paragraph
^F move forward
^H delete backward
^K delete to the end of the paragraph
^L center the selection in the text area
^N move down
^O split the current line
^P move up
^T transpose letters
^V move one page down
^Y yank back ‘killed’ text
It won’t replace your vim muscle memory, but ^a and ^e and ^t and ^k and ^y are really quite useful, and you will find you can use them all over the place, so they are worth learning.
--
The easiest way to find something lost around the house is to buy a
replacement.
Howdy,
While BBEdit may support these keys (and more!) it isn't because the Apple Text Framework supports them since BBEdit doesn't use that framework AFAIK.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
[snip]
> While BBEdit may support these keys (and more!) it isn't because the Apple Text Framework supports them since BBEdit doesn't use that framework AFAIK.
Right, which is why I said BBEdit may support more.
--
Though it's cold and lonely in the deep dark night I can see paradise by
the dashboard light.
>Of course, the whole thing about a modal editor like Vim is that you
>don't have to do all kinds of crazy key combos like
>command-control-key to run your command.
But you do need to change mode, which requires some action on your
part other than simple thought-transference.
>I'm sure you could write a ton of applescripts to semi simulate the
>'in' and 'around' motions that act on logical text units, but the
>long and short of it is that if it's not a modal editor, you can't
>string simple single letter commands together like you can in a
>modal editor.
First of all it is not necessary to have a 'ton' of AppleScript
scripts but only one and that might begin like this:
set _dlog to display dialog "Type your command" default answer ""
set _command to text returned of _dlog
and be activated by a simple non-crazy keystroke equivalent to
whatever you do to change mode in vi.
It would then act on _command to perform the required actions using
either AppleScript or Perl. In addition to all your finger-memory
commands you would be able to add whatever extra magic you wanted.
The proportion of AppleScript proper in the script would be minimal.
_command can be passed to a Perl or Python etc. routine or whatever
is most suitable. I can understand anyone who is averse to learning
AppleScript but the fact is that Apple events serve as a very useful
conduit and people who ignore them are missing much of the power of
the Mac, which is not simply UNIX with a pretty face.
JD
Indeed. Look up Quick Cursor.
With respect to mutt, I've used BBEdit to compose my mail with mutt for
about 3 years after I finally decided I had to have IMAP and stopped
using Mailsmith.
There's no point in getting a big discussion about modal versus
non-modal editors. I'm sure it's all been had many, many times in the
past. Suffice to say that some people find modal editors useful.
It really does give many common actions simple single letter commands.
I used BBEdit for 10 years straight as my only editor. This past year I
finally broke down and taught myself some Vim. For many uses, Vim has
nothing on BBEdit, but there are certain areas where it really is better
(for me), particularly when it comes to editing and moving text, as well
as navigating.
> 7) LaTeX integration
I'm sheepish to admit I don't know about this. I don't find the word "LaTeX" in the user manual.
There's syntax coloring for LaTeX, there are clippings that I've extended, and I use the worksheet to do builds, but I'm not aware of anything specific. Where should I be looking?
— F
I always use the CompileTeX scripts. I modified them a bit for myself,
but they always work rather well.
I guess those are the scripts that I originally wrote [1].
Curious to see what you added.
Best,
Maarten
Yes, they are. Most of the changes I made were to remove a bunch of
functions I never used. I also think I modified the 'open file'
function so that it would search the current line for any graphics,
include, or input statement and open said file.
Lastly, I added in some functionality to run python scripts that were
referred to in a specially formatted comment. This let me generate
or update graphics files made by said python scripts right from BBEdit.
Ultimately, I didn't make that many changes. Just tweaked it for my own
purposes. Thanks so much for the scripts. I wrote my Ph.D. thesis in
LaTeX in BBEdit with the help of your scripts.
No, the LaTeX integration comes from the tools that hook into BBEdit for LaTeX support.
> There's syntax coloring for LaTeX, there are clippings that I've extended, and I use the worksheet to do builds, but I'm not aware of anything specific. Where should I be looking?
<http://mactex-wiki.tug.org/wiki/index.php/Editors#BBEdit>
<http://mactex-wiki.tug.org/wiki/index.php/GUI_Tools#Flashmode>
For a start.
--
The fact that Bob and John are married does nothing to diminish anyone
else's marriage any more than a black woman marrying a white man, a Jew
marrying a Catholic, or an ugly Lyle marrying a Pretty Woman
Greg Shenaut
With NFS/SMB/webDAV I edit files on Windwos and FreeBSD machines with BBEdit all the time.
--
The most perfidious way of harming a cause consists of defending it
deliberately with faulty arguments.
As someone who is using more Vim nowadays (MacVim is pretty nice), I would probably abandon it completely if BBEdit had a Vim mode. Especially one that included word and sentence motions...What do these motions achieve? Something that cannot be achieved with scripts/keystrokes in BBEdit. I doubt it, but am always ready to be enlightened.
I think it's just that there are some extremely compact, useful sequences that become automatic for vi users. Things like “xp”, “5xwep”, “d3w”, “dL", and so on. Yes, of course all these things can be done in BBedit, that's not really the point. And of course if you don't already have them “in your fingers”, then there would be no reason to try to learn them. It's more that once you've become fluent in vi (or any other highly keystroke oriented program), using those compact sequences becomes second nature and is easier and more efficient than sequences that involve highlighting with a mouse, invoking a contextual or menu-bar menu item, or even Command+key sequences.
> This would be the equivalent of choosing a package that allowed BBEdit to "run in Vi mode", for example, at which point the interface and user actions would be nearly indistinguishable from actually running Vi.
That would be horrible. :-)
Steve
Here is a simple but nice example. I use this to insert the URL from Safari's front window as an HTML link.
I have a clipping "Insert Safari URL" (in Universal Items) that contains only one line.
<a href="#script get_safari_url#">#SELECTIONORINSERTION#</a>
The Applescript itself is much more complicated - it contains two lines ;-)
tell application "Safari" to set the_url to URL of front document
return the_url
I saved this script in the same folder the clipping is in. Of course it must be named "get_safari_url.scpt" to match the clipping's text.
So, whenever I need a link to the currently open Safari page, I simply select the text I want to turn into a link and invoke the clipping.
This is a quick and dirty solution and might fail under certain circumstances but it works fine for me. To connect this example to the topic of the thread: I like BBEdit because I consider it a successful balance of powerful features, flexibility and accessibility (in the sense of "I have a good feeling for what the editor is capable of and don't have to be a black belt ninja coder to conjure functionality by some kind of magic finger dances on my keyboard").
happy clipping,
Roland
>AppleScript (which seems to be primarily useful for customizing your
>interaction with the app)
I just had a crazy thought. Hey BareBones, what do you think of a
notion of being able to harness BBEdit to manipulate text *without* a
window? Like, instead of 'tell text document 1' it could be 'tell
someTextObject'?
I think I'm typing in my sleep, but I'm gonna hit Send anyway.... <g>
-boo
>...what do you think of a notion of being able to harness BBEdit to
>manipulate text *without* a window? Like, instead of 'tell text
>document 1' it could be 'tell someTextObject'?
>
>I think I'm typing in my sleep...
I think so too. When you wake up you'll realize it's childsplay to do it.
JD
______________________________________________________________________
I don't think it's crazy at all. Some of BBEdit's events will operate on a non-BBEdit object. I would like to see more capable of same.
--
Best Regards,
Chris
>On Aug 11, 2011, at 03:24, Walter Ian Kaye wrote:
Well I was thinking it would be a BBEdit object, just not a 'text
document' container. Maybe 'text blob' or something; I dunno where it
would fit in the object model hierarchy; I suppose right between
'application' and 'text'.
Hey Walter,
This works:
set textList to "
three
four
five
"
tell application "BBEdit"
sort lines textList
end tell
--
Best Regards,
Chris
David Kelly squaked out on Thu 28-Jul-2011 09:38