On Oct 12, 2016, at 10:15, Johan Sölve <[email protected]
<mailto:[email protected]>> wrote:
> Since I work in the middle of an ongoing indentation war (you know, tabs vs.
> spaces) I have a need for auto-detecting the indentation mode when opening …
>
> I'm not even sure if it's possible to hook a script into opening files, no
> matter how a file was opened.
Hey Johan,
Look for “Document attachment points” in the BBEdit manual and
“documentDidOpen”.
You'll want your script to take this general form:
--------------------------------------
using terms from application "BBEdit"
on documentDidOpen()
beep
end documentDidOpen
end using terms from
--------------------------------------
With a file-name like this: Document.documentDidOpen.scpt
I may have discovered a bug with this and have a query in to support.
NOTE:
I've done stuff like this before and don't really recommend it as an automated
process. I've had too many instances where something fairly critical got
changed unexpectedly.
It's easy enough to create a keyboard shortcut driven script to do this.
Generally I use tabs anyway and detab if needed.
But of course YMMV.
--
Best Regards,
Chris
--
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].
Visit this group at https://groups.google.com/group/bbedit.