script/text filter advice

2021-08-29 Thread Tim Gray
Is AppleScript the best/most powerful way to script text manipulation based on 
where the cursor currently is?  I know Text Filters can be very useful, but 
only seem to operate on selected text (or the whole document).  But I'm looking 
to modify the current line if nothing is selected or modify the selected lines 
if multiples are selected, even if they are only partially so.  I'm assuming 
that AppleScript is the only tool available for stuff like this in BBEdit.

Thanks,
Tim

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/c6c076ef-0d79-4670-b3c9-e751cde56d52%40www.fastmail.com.


Re: Bespoke preferences

2021-08-29 Thread Christopher Stone
> On Aug 29, 2021, at 05:48, 'Michael Hall' via BBEdit Talk 
>  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 
# 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  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 "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/45271847-7A6B-48F6-96C4-98FF11FE1E05%40gmail.com.


Re: Questions about editorconfig

2021-08-29 Thread Johnny Ragadoo
Thanks - editorconfig is on my list to explore.

> On Aug 29, 2021, at 3:19 PM, Christopher Waterman  
> wrote:
> 
> It’s manual.
> 
> There is builtin support for EditorConfig file type, which comes with a set 
> of completions for the keys.
> 
> Be sure to check out the entry in the manual as it goes over the BBEdit 
> specific keys.
> 
> — Chris(topher)?
> 
>> On Aug 29, 2021, at 9:49 AM, Johnny Ragadoo  wrote:
>> 
>> Are editorconfig files intended to be created by hand or does BBEdit have 
>> features to maintain them?
>> 
>> I bought BBEdit this week, and I'm delighted. I haven't had anything this 
>> nice since VEDIT back in the old DOS days. That's not sarcasm. Anything in 
>> VEDIT's league (it's Windows-only) is very powerful.
>> 
>> My life is centered around Linux and Python. I plan to use BBEdit for 
>> coding, but my primary use will be for creative writing.
>> 
>> All those foibles and limitations in pretty word processors - faugh! A pox 
>> on them.
>> 
>> Click and shift-click in the list of files in a project, copy full file 
>> path, paste into a "manifest" document, and a quick text factory replaces 
>> ^(.*)$ with <<[&]. Drag that to Marked2 and I've got a docx for import into 
>> Affinity Publisher, or Nisus, or Mellel - pretty much anywhere but Word.
>> 
>> I don't do Word.
>> 
>> So, are editorconfig files hand-maintained?
>> 
>> -- 
>> This is the BBEdit Talk public discussion group. If you have a feature 
>> request or need technical support, please email "supp...@barebones.com" 
>> rather than posting here. 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bbedit/c7191466-2a4c-4257-8575-a5bb2723752fn%40googlegroups.com.
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "supp...@barebones.com" 
> rather than posting here. Follow @bbedit on Twitter: 
> 
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "BBEdit Talk" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/bbedit/YUR8i_UjiUA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> bbedit+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/C1E3026D-0479-4551-962D-47AEDA6CA729%40rustydogink.com.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/9AB35528-EA11-4CA4-AED5-A97B10876D16%40gmail.com.


Re: Bespoke preferences

2021-08-29 Thread Christopher Waterman
I think this is what you are looking for.

- Open the menu, BBEdit: Preferences.

- There is a languages tab in the left column (the icon looks like hands on a 
typewriter).

- The last section on the panel is "Language-specific settings:”

- Add the language (file type) you want specific settings for and have at it.

It isn’t exhaustive, you can’t turn tab-stops on & off for instance. 
But I have different color schemes and display settings set up for Shell 
Worksheets, Unix man pages... a bunch of stuff.


I hope that is what you are looking for,
— Chris(topher)?

> On Aug 29, 2021, at 3:48 AM, 'Michael Hall' via BBEdit Talk 
>  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. 

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/DA9B5777-6BF2-4229-9BC5-3C646620%40rustydogink.com.


Re: Questions about editorconfig

2021-08-29 Thread Christopher Waterman
It’s manual.

There is builtin support for EditorConfig file type, which comes with a set of 
completions for the keys.

Be sure to check out the entry in the manual as it goes over the BBEdit 
specific keys.

— Chris(topher)?

> On Aug 29, 2021, at 9:49 AM, Johnny Ragadoo  wrote:
> 
> Are editorconfig files intended to be created by hand or does BBEdit have 
> features to maintain them?
> 
> I bought BBEdit this week, and I'm delighted. I haven't had anything this 
> nice since VEDIT back in the old DOS days. That's not sarcasm. Anything in 
> VEDIT's league (it's Windows-only) is very powerful.
> 
> My life is centered around Linux and Python. I plan to use BBEdit for coding, 
> but my primary use will be for creative writing.
> 
> All those foibles and limitations in pretty word processors - faugh! A pox on 
> them.
> 
> Click and shift-click in the list of files in a project, copy full file path, 
> paste into a "manifest" document, and a quick text factory replaces ^(.*)$ 
> with <<[&]. Drag that to Marked2 and I've got a docx for import into Affinity 
> Publisher, or Nisus, or Mellel - pretty much anywhere but Word.
> 
> I don't do Word.
> 
> So, are editorconfig files hand-maintained?
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "supp...@barebones.com" 
> rather than posting here. 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/c7191466-2a4c-4257-8575-a5bb2723752fn%40googlegroups.com
>  
> .

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/C1E3026D-0479-4551-962D-47AEDA6CA729%40rustydogink.com.


Re: Bespoke preferences

2021-08-29 Thread 'Michael Hall' via BBEdit Talk
Thanks, but I've already read that article and found it useful for my 
writing needs but not for coding. Sounds from your reply that a ready 
solution might not exist. If that's the case I wonder if it is something 
the developers could look at. It's not a major issue as I can always 
continue writing in Byword but it would be nice to do everything in the 
same editor.

On Sunday, 29 August 2021 at 17:23:52 UTC+1 rms...@gmail.com wrote:

> Perhaps not exactly what you were looking for, but have a read of this 
> https://storiesandnovels.com/bbedit/ as it explains how to setup a 
> writing environment.  Just translate into your needs?
>
> On Sunday, 29 August 2021 at 11:50:07 UTC+1 cow...@mac.com wrote:
>
>>
>>1. I'm new to BBEdit (v14) and am trying to create an editing 
>>environment based on the file type I'm editing. For instance, when 
>> editing 
>>an html document I want to have line numbers and the gutter visible, 
>>amongst other things, but when editing a markdown or text document I want 
>> a 
>>much cleaner view, i.e. no line numbers or gutter.
>>
>>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. 
>>
>>The user guide is a little overwhelming to a beginner and I don't 
>>think what I'm looking for is in there, but of course it might be.
>>
>>Hoping there is some advice out there. Thank you.
>>
>>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/5ef49e59-da45-4e7d-b943-a84797d7a537n%40googlegroups.com.


Questions about editorconfig

2021-08-29 Thread Johnny Ragadoo
Are editorconfig files intended to be created by hand or does BBEdit have 
features to maintain them?

I bought BBEdit this week, and I'm delighted. I haven't had anything this 
nice since VEDIT back in the old DOS days. That's not sarcasm. Anything in 
VEDIT's league (it's Windows-only) is very powerful.

My life is centered around Linux and Python. I plan to use BBEdit for 
coding, but my primary use will be for creative writing.

All those foibles and limitations in pretty word processors - faugh! A pox 
on them.

Click and shift-click in the list of files in a project, copy full file 
path, paste into a "manifest" document, and a quick text factory replaces 
^(.*)$ with <<[&]. Drag that to Marked2 and I've got a docx for import into 
Affinity Publisher, or Nisus, or Mellel - pretty much anywhere but Word.

I don't do Word.

So, are editorconfig files hand-maintained?

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/c7191466-2a4c-4257-8575-a5bb2723752fn%40googlegroups.com.


Re: Bespoke preferences

2021-08-29 Thread Rob Schneider
Perhaps not exactly what you were looking for, but have a read of 
this https://storiesandnovels.com/bbedit/ as it explains how to setup a 
writing environment.  Just translate into your needs?

On Sunday, 29 August 2021 at 11:50:07 UTC+1 cow...@mac.com wrote:

>
>1. I'm new to BBEdit (v14) and am trying to create an editing 
>environment based on the file type I'm editing. For instance, when editing 
>an html document I want to have line numbers and the gutter visible, 
>amongst other things, but when editing a markdown or text document I want 
> a 
>much cleaner view, i.e. no line numbers or gutter.
>
>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. 
>
>The user guide is a little overwhelming to a beginner and I don't 
>think what I'm looking for is in there, but of course it might be.
>
>Hoping there is some advice out there. Thank you.
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/ab8abc54-5278-46a6-9545-e27c89a4edbcn%40googlegroups.com.


Bespoke preferences

2021-08-29 Thread 'Michael Hall' via BBEdit Talk

   
   1. I'm new to BBEdit (v14) and am trying to create an editing 
   environment based on the file type I'm editing. For instance, when editing 
   an html document I want to have line numbers and the gutter visible, 
   amongst other things, but when editing a markdown or text document I want a 
   much cleaner view, i.e. no line numbers or gutter.
   
   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. 
   
   The user guide is a little overwhelming to a beginner and I don't think 
   what I'm looking for is in there, but of course it might be.
   
   Hoping there is some advice out there. Thank you.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/b567f3eb-fca4-461a-b676-673113ac0183n%40googlegroups.com.