Re: Can 'normalize options' be applied to multiple files (eg: all files in a project)?

2018-04-14 Thread Christopher Stone
On 04/13/2018, at 14:17, Patrick Woolsey > wrote:
>> What's an EditorConfig?
> 
> What Rich just said :-) or for background plus some BBEdit-specific details, 
> please see the "EditorConfig" section on page 46-47 of the current user 
> manual  (via Help -> User Manual).


Or save this script into your BBEdit scripts folder as a .sh file with a title 
like “06)Open BBEdit User Manual in Preview.sh”, and give it a keyboard 
shortcut in BBEdit's “Menus and Shortcuts” preferences like 
Cmd-Opt-Ctrl-Shift-M.


#! /usr/bin/env bash
# 
# Auth: Christopher Stone
# dCre: 2014/01/02 18:46
# dMod: 2014/08/31 23:04
# Task: 
# Tags: @Shell, @Script, @Open, @BBEdit, @User, @Manual, @Preview
# 
# Open BBEdit User Manual in Preview

cd ~/Library/'Application Support/BBEdit/'
open -a Preview "$('ls' -1 'BBEdit User Manual'*.pdf | sed -n '$p')"


~/Library/Application Support/BBEdit/Scripts/

That puts you one keystroke away from your user manual.

One caveat - it won't download the newest version of the manual like Help --> 
User Manual will.

Personally I use a Keyboard Maestro macro to very simply solve that little 
issue:


Keyboard Maestro isn't cheap at $36.00 U.S., but it's probably saved me 
man-years of time and reduced my RSI issues by more than half.


Then again there's a free alternative using AppleScript and System Events.

Save this script using the Applescript Editor.app in BBEdit's scripts folder, 
and give it a keyboard shortcut:


# Auth: Christopher Stone
# dCre: 2018/04/14 07:40
# dMod: 2018/04/14 07:44
# Appl: BBEdit, System Events
# Task: Open BBEdit User Manual in Default PDF Viewer Application.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @System_Events, @Open, @BBEdit, @User, 
@Manual, @Default, @PDF, @Viewer, @Application


tell application "System Events"
tell application process "BBEdit"
tell menu bar 1
tell menu bar item "Help"
tell menu 1
tell menu item "User Manual"
perform action "AXPress"
end tell
end tell
end tell
end tell
end tell
end tell



This will most likely work only with English language systems, but I'm happy to 
help convert it if needed.

The moral of the story?

While Google is your friend, it's good to start with the actual user manual.

And don't forget — you can search BBEdit's menus for commands with the Search 
field in the Help menu.

Cmd-Shift-? gets you there in a hurry.

--
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: 
--- 
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.
Visit this group at https://groups.google.com/group/bbedit.


Re: Can 'normalize options' be applied to multiple files (eg: all files in a project)?

2018-04-13 Thread Patrick Woolsey

On 4/13/18 at 1:27 PM, g...@me.com (gpan) wrote:


What's an EditorConfig?


What Rich just said :-) or for background plus some 
BBEdit-specific details, please see the "EditorConfig" section 
on page 46-47 of the current user manual  (via Help -> User Manual).


Regards,

 Patrick Woolsey
==
Bare Bones Software, Inc. 




--
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: 
--- 
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.
Visit this group at https://groups.google.com/group/bbedit.


Re: Can 'normalize options' be applied to multiple files (eg: all files in a project)?

2018-04-13 Thread Rich Siegel

On 4/13/18 at 1:27 PM, g...@me.com (gpan) wrote:


I tried the 'nuclear option' and it didn't seem to work.


In that case one of two things is likely:

1. You have an EditorConfig file in the project which is setting 
options for those files;


2. You have a language-specific preference which is setting 
Auto-Expand Tabs. (You can check the Languages preferences.)



What's an EditorConfig?


I suggest a Google search. :-)

R.
--
Rich Siegel Bare Bones Software, Inc.
  

Someday I'll look back on all this and laugh... until they 
sedate me.


--
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: 
--- 
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.
Visit this group at https://groups.google.com/group/bbedit.


Re: Can 'normalize options' be applied to multiple files (eg: all files in a project)?

2018-04-13 Thread gpan
I tried the 'nuclear option' and it didn't seem to work.

Basically I want all files to have 'Auto-Expand Tabs' set to 'FALSE' by 
default.

In Preferences -> Editor Defaults, I have:

Auto-indent: ON
Balance While Typing: ON
Use Typographer's quotes: OFF
Auto-expand tabs: OFF
Show Invisible Characters: OFF
  Show Spaces: ON [disabled]
Check Spelling as you type: OFF
Soft Wrap Text to [Page Guide]

Every file I open has 'Auto-expand tabs' set to ON. I either have to set it 
to OFF explicitly or trigger 'Normalize Options' for the file.


...

What's an EditorConfig? 





On Tuesday, April 10, 2018 at 12:42:42 PM UTC-7, Rich Siegel wrote:
>
> On 4/10/18 at 2:57 PM, gp...@me.com  (gpan) wrote: 
>
> > Seems every file in my project has the wrong whitespace defaults. I'd 
> > like to change all of them without having to choose 'Normalize 
> > Options' for each one individually. 
>
> There's no way to batch this operation, but you could: 
>
> -   use "Normalize Options" as needed; 
>
> -   install an EditorConfig file to ensure consistent behavior; 
>
> -   quit the application and delete the "Document State.plist" file 
> which will discard all saved settings for all documents. (This is 
> the nuclear option.) 
>
> R. 
> -- 
> Rich Siegel Bare Bones Software, Inc. 
>   <
> http://www.barebones.com/> 
>
> Someday I'll look back on all this and laugh... until they sedate me. 
>
>

-- 
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: 
--- 
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.
Visit this group at https://groups.google.com/group/bbedit.


Re: Can 'normalize options' be applied to multiple files (eg: all files in a project)?

2018-04-10 Thread Christopher Stone
On 04/10/2018, at 13:57, gpan > wrote:
> Seems every file in my project has the wrong whitespace defaults. I'd like to 
> change all of them without having to choose 'Normalize Options' for each one 
> individually.


Hey Gerry,

It's possible this could be done via AppleScript.

How many files in what sort of directory structure?

What exact options need to change per document.

--
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: 
--- 
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.
Visit this group at https://groups.google.com/group/bbedit.


Can 'normalize options' be applied to multiple files (eg: all files in a project)?

2018-04-10 Thread gpan
Seems every file in my project has the wrong whitespace defaults. I'd like 
to change all of them without having to choose 'Normalize Options' for each 
one individually.

–Gerry

-- 
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: 
--- 
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.
Visit this group at https://groups.google.com/group/bbedit.