> On Aug 29, 2021, at 05:48, 'Michael Hall' via BBEdit Talk > <[email protected]> wrote:I think I'm asking for a particular set of > preferences based on the type of file I want to edit. Currently I'm opening a > file and making the preference changes before I start to edit. Surely BBEdit > has a way of doing this that I have missed.
Hey Michael, You can customize BBEdit a great deal with AppleScript. Run this from Apple's Script Editor.app to see how it works. -------------------------------------------------------- # Auth: Christopher Stone <[email protected]> # dCre: 2021/08/29 16:32 # dMod: 2021/08/29 16:32 # Appl: BBEdit # Task: Set Up Markdown Document Work Environment # Libs: None # Osax: None # Tags: @Applescript, @Script, @ASObjC, @BBEdit, @SetUp, @Markdown, @Work, @Environment -------------------------------------------------------- tell application "BBEdit" activate set newDoc to make new text document tell newDoc set its source language to "Markdown" tell its window set bounds to {0, 45, 1440, 900} if show line numbers ≠ false then set show line numbers to false end if end tell end tell end tell -------------------------------------------------------- Save it as a compiled script, and place it in BBEdit's Script menu. ~/Library/Application Support/BBEdit/Scripts/ Give it a keyboard shortcut in BBEdit's Menus & Shortcuts preferences. Go to town. There are more AppleScript properties available. I recommend using Script Debugger <https://latenightsw.com/> instead of Apple's Script Editor.app, because SD eats SE's lunch. (Even if you don't buy SD and only use the freeware “Lite” version it becomes after a 30 day demo period you will still appreciate the vast difference in capability.) You can create hotkey driven scripts for each document type you want to work with. Or – you can create a pop-up dialog with a pick-list of document types. The world is not your oyster, but there is quite a lot of flexibility available to you. -- Best Regards, Chris -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting here. Follow @bbedit on Twitter: <https://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 view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/45271847-7A6B-48F6-96C4-98FF11FE1E05%40gmail.com.
