On 15 May 2013, at 3:48 PM, Jeremy Cowgar <[email protected]> wrote:
> Via AppleScript, can I ask BBEdit what the current document's programming
> language is? I know that I can look at the name of the current document and
> parse the extension of the file, but I was hoping for a more sure way, and
> easier way, to get the programming language.
It's a property of clipboard, text document, and text window.
tell application "BBEdit"
the source language of (text document 1)
end tell
-> "Markdown"
The repertoire of language names may vary. It reflects the setting in the
language popup in the editor, which may be user-set, or BBEdit's guess, or
nothing at all.
— F
--
Fritz Anderson
Xcode 4 Unleashed: 4.5 supplement for free!
http://www.informit.com/store/xcode-4-unleashed-9780672333279
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" 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 [email protected].
To post to this group, send email to [email protected].