Change Language Script for BBEdit

Do you want a script to quickly change the language of the current document in BBEdit?[1] Here you go:

tell application "BBEdit" set source language of front text document to "Markdown" end tell

I have several languages triggered by the same keyboard shortcut (ctrl-shift-L) using Keyboard Maestro. The group is only available while in BBEdit so there’s no need to include an “activate” command. Since they all use the same shortcut, I actually get a quick list to choose from.


  1. The ctrl-opt-L shortcut does something similar in BBEdit right out of the box. It opens the language menu. Typing the language then selects that option. This script is quicker and I only see my most commonly used languages.  ↩