Here's a script that to set the tab width for a document with a dialog. --CODE BEGINS (* Set document tab width in BBEdit Most is copied from Marcus Garvey's message #7 at http://macscripter.net/viewtopic.php?pid=100407 *) tell application "BBEdit" repeat set dialogResult to (display dialog "Enter a starting number:" default answer "") try set startNumber to (text returned of dialogResult) as number if (class of startNumber is integer) then exit repeat end try display dialog "The starting number needs to be a valid integer!" buttons {"Enter again", "Cancel"} default button 1 end repeat set tab width of window 1 of text document 1 to startNumber end tell --CODE ENDS
On Jul 27, 1:40 pm, Watts Martin <[email protected]> wrote: > Bruce Van Allen wrote: > > On 2011-07-26, Watts Martin wrote: > > >> As near as I can tell, there's no way to adjust the tab width for a > >> document at *all* -- you can only change the editor default and the > >> per-language setting. I'm surprised, thinking about it, that tab width > >> isn't adjustable via the per-document Text Options. (And a little > >> surprised those aren't saved with documents.) > > > What? Those things work over here (BBEdit 10, OS X 10.7, and worked for > > years). > > > I use this applescript saved in scripts folder, with Control-Tab set as > > keyboard command: > > That will certainly work; thank you. > > I suppose to be precise I should have said there appeared to be no UI > control to adjust the tab width on a document-level basis. It's great > that BBEdit has the scripting support that it does, but I'm also bemused > at times by how often scripting seems to be the *only* way to do > something that seems relatively trivial, like set tab widths for the > current document. :) > > In any case, this is reinforcing my earlier thought that there really > needs to be a BBEdit "Tips & Tricks" wiki, that allows attachments for > scripts, snippets (and now packages). > > -- > Watts Martin <[email protected]> > > smime.p7s > 5KViewDownload -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> 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>
