Bbedit

Bare Bones Software has released BBEdit 14.0, a new version with a whole bunch of new features. (Even the oldest software dogs are fully capable of learning new tricks.)

  1. Bbedit Download
  2. Bbedit
  3. Bbedit C#

The biggest new feature in BBEdit is Notes, a persistent collection of casual documents. Yes, there are other places you can leave yourself notes—but those places aren’t BBEdit. As a BBEdit user, I frequently find myself with a very large number of untitled documents full of stuff. Notes are the solution, since they’re automatically saved and viewable in a new Notes browser. Just as I was writing this story, I ended up on a phone call and needed to take some notes. Rather than naming and saving the file somewhere or switching to a different app, I just opened a note in BBEdit (where I was already writing) and took notes there.

For programmers, the biggest BBEdit 14 addition is support for the Language Server Protocol, a standard originally developed by Microsoft for Visual Studio Code and now available for pretty much any developer tool out there. Different editors can access a local language server to provide consistent autocompletion, definitions, and documentation. It’s still a bit early days for LSPs, both within BBEdit and without. I used the Python language server Jedi and sometimes it worked flawlessly, but other times it was a bit buggy. My understanding is that many of these language servers are still built with some very specific development tools in mind and that there may be bugs when trying to use them with a tool they didn’t even know about, like BBEdit. But I would be shocked if this wasn’t all working a lot better a few months down the road, now that BBEdit 14 is out in the world.

As someone who has been experimenting with writing code in Python, JavaScript, and PHP, I am intrigued by the LSP features but also am not the best person to judge how well they’re implemented. But I love the idea that BBEdit is trying to play ball with tools that are popularly used in other development tools—and I’m hopeful that I’ll be able to use the feature more in the future.

Bbedit

BBEdit is the leading professional HTML and text editor for the Mac. Specifically crafted in response to the needs of Web authors and software developers, this award-winning product provides a plethora of features for editing, searching, and manipulation of text. BBEdit is a high-performance HTML and text editor for the Macintosh. BBEdit is a proprietary text editor made by Bare Bones Software, originally developed for Macintosh System Software 6, and currently supporting macOS. The first version of BBEdit was created as a 'bare bones' text editor to serve as a 'proof of concept'; the intention was to demonstrate the programming capabilities of an experimental version of Pascal for the Macintosh. BBEdit is the leading professional text, code, and markup editor for the Macintosh. As the 'go to' tool for web site designers, web application developers, writers, and software developers, this award-winning product provides an abundance of high-performance features for editing, searching, and manipulation of text, code, and HTML/XML markup. BBEdit is available for Mac, iPhone and iPad. Individuals and Businesses About BBEdit. The leading professional HTML and text editor for the Mac, with high.

In the meantime, most of what I edit in BBEdit is in Markdown. Maybe someone will decide it’s time to make a linter/syntax checker for Markdown, designed for BBEdit’s new features.

Bbedit

But there are some new Markdown features, regardless! Dragging an HTML file or an image into BBEdit will now generate appropriately formatted Markdown. Markdown footnotes are now properly syntax colored, for those monsters who put footnotes in their Markdown.1

Also, a new feature that I inspired makes its debut: BBEdit now lets you attach a script in order to provide control over the text generated when you drop an image file into a BBEdit editing view. In short, I have modified the AppleScript script that I use to upload images to Six Colors so that if I drag an image into my story in BBEdit, the image is automatically resized, uploaded, and the proper HTML is inserted at that point in the document. (It’s magical.)

A BBEdit 14 license is free for users who bought BBEdit this year, $30 for those who bought it last year, $40 for users of older versions, and $50 for brand-new purchasers. And of course, a large swath of BBEdit’s features are available for free without a license.

If you appreciate articles like this one, support us by becoming a Six Colors subscriber. Subscribers get access to an exclusive podcast, members-only stories, and a special community.

With the installation of the TypeScript components, you are ready to set up your development environment and BBEdit.

Setting up your Development Environment

When using TypeScript and TypeScript Server as tools for creating plug-ins, think of yourself as a “Plug-In Developer” who has dedicated some disk space to use as their “Plug-In Workshop.”

This “Plug-In Workshop” folder will contain:

  • Any required TypeScript Server support files (tsconfig.json)
  • Application TypeScript definition files (“.d.ts”) for each of the Omni applications for which you wish to create plug-ins.
  • Any Omni Automation plug-in files you are in the process of developing. NOTE: In order to be checked by the TypeScript Server for errors, these plug-in files must use the file extension of “.ts” instead of the standard Omni plug-in file extensions: omnijs, omnifocusjs, omnigrafflejs, omniplanjs, or omnioutlinerjs
DO THIS ►

DOWNLOAD the example development folder containing the necessary resources for developing plug-ins for OmniFocus 3. Place the folder in your Documents folder.

Bbedit

Preparing BBEdit

There are a couple things to do to prepare BBEdit 14 for use with TypeScript and Omni Automation:

Bbedit

Bbedit Download

1) Allow Sandbox Access to BBEdit so that the provided AppleScript script can write to the various Omni plug-in folders.

If Sandbox Access in the BBEdit application preferences has not previously been enabled, enable it now.

1 Application Preferences • Select “Application” in the preferences categories list.

2 Sandbox Access Settings • The current Sandbox Access settings. If it reads “Sandbox access: allowed” you’re all set, otherwise…

3 Enable Access Button • Press this button to approve Sandbox Access for BBEdit.

2) Install the provided AppleScript script in the BBEdit Scripts folder.

In BBEdit, select the “Open Scripts Folder” option from the Scripts menu. The folder will open on the desktop. Move the provided “OmniFocus Plug-In Install.scpt” file from the downloaded “Omni Automation Plug-In Development” folder into the BBEdit Scripts folder opened on the desktop.

Close the folder, and the script will now be available within BBEdit.

The “OmniFocus Plug-In Install” script is designed to export a copy of the current Omni Automation plug-in that you are editing in BBEdit to the default local OmniFocus plug-ins folder. The export file will automatically be given the file extension of “omnifocusjs” so that it is recognized by OmniFocus as a plug-in.

So the basic concept for plug-in development is that you work on a TypeScript version of the plug-in, that you export to the OmniFocus plug-ins folder.

NOTE: The first run of the script may trigger the following security dialog requiring your approval for BBEdit to run a script controlling the Finder:

Click “OK” to allow the script to proceed.

File Settings in BBEdit

After you’ve opened an Omni Automation plug-in file in BBEdit (after confirming that the file extension of the plug-in file is “.ts”) you may need to set the language type popup at the bottom of the window to TypeScript:

Ready for Use

You are now ready to use TypeScript Server to provide code completion and error checking for your plug-in code in BBEdit!

Open the provided example plug-in file “all-hello-world.ts” in BBEdit.

Dealing with an Error

One of the lines of code in the plug-in is triggering an error warning by highlighting its corresponding line number.

Click once on the highlighted line number to reveal the error message:

NOTE: (see above) the command show() is underlined in the code statement, indicating that it is the cause of the error:

Bbedit

Holding down the Command Key (⌘), double-click on the term: show

Bbedit C#

Bbedit

The OmniFocus TypeScript dictionary file “omnifocus.d.ts” will be opened, showing the Alert class definition with show highlighted (see below):

(see above) The red-underlined section of the entry indicates that the show() command takes either a Function or null as the value of its callback parameter. The show() in the code is missing this value, thereby triggering the error.

In BBEdit, switch back to displaying the plug-in file. (all-hello-world.ts)

Add “null” (no quotes) as the parameter for show() in the code.

The error will be resolved and no longer be triggered to display:

Install and Run the Plug-In

Run the previously installed AppleScript script “OmniFocus Plug-In Install” and the plug-in code will be written to a new file in the local OmniFocus Plug-Ins folder.

Switch to OmniFocus and run the script from the Automation menu by selecting the menu option “TypeScript Plug-In”: