On Dec 27, 2015, at 16:55, Richard Fairbanks <li...@f-p-i.com> wrote:
> Months ago, I bumped from BBEdit 9 to 11, and a minor annoyance is that when 
> I open an existing text document, the window now gets tiled to the right (or 
> not . . . ).
> 
> I would like it to stop doing this, but have found no setting to change.
______________________________________________________________________

Hey Richard,

There's no way I know of to enforce the placement of a single existing document 
that's opened.

You can save “Default Text Window” characteristics from the window menu, but 
that doesn't affect window placement.

You can turn on “Open documents into the front window when possible” in the 
Application pane of BBEdit's preferences.  That gives you some control, but I 
don't like the setting [ON] unless I'm deliberately building a project.

Now then – moving and resizing windows is really easy with AppleScript.

---------------------------------------------------------------------------
# Resize Front Window
---------------------------------------------------------------------------

tell application "BBEdit"
  set bounds of front window to {303, 44, 1617, 1196}
end tell

---------------------------------------------------------------------------
# Open New Text Document with Fixed Size and Position
---------------------------------------------------------------------------

tell application "BBEdit"
  set newDoc to make new document with properties {bounds:{303, 44, 1617, 1196}}
end tell

---------------------------------------------------------------------------
# Copy Bounds of Front BBEdit Window to the Clipboard
---------------------------------------------------------------------------

tell application "BBEdit"
  set winBounds to bounds of front window
end tell
try
  winBounds / 0
on error e
  set AppleScript's text item delimiters to {"{", "}"}
  set the clipboard to "{" & text item 2 of e & "}"
end try

---------------------------------------------------------------------------

You can test these by running them from the Script Editor.app.

Position your front window exactly the way you want it, and run the last script.

The window's bounds will be copied to the clipboard, and you can replace them 
in the given scripts with your preference.

Save the scripts you want to use with the Script Editor.app in file-format 
script, and give them usefully descriptive names.

Put them here:

~/Library/Application Support/BBEdit/Scripts/<your-script>

Give the scripts you want to access via hotkey a keyboard shortcut in BBEdit's 
“Menu & Shortcuts” preferences.

I've been using this general methodology, since BBEdit got AppleScript support.

--
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
"supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.

Reply via email to