Re: Window management and virtual desktop question

2021-06-11 Thread Sam Hathaway
On 11 Jun 2021, at 3:24, Jan Erik Moström wrote: Window 5 - all desktops Perhaps you could use View > Open in Additional Window to make as as many windows for the same document as you have virtual desktops? Scrolling/selection wouldn’t be synchronized, but at least you’d have the window

Re: Two files in the same window

2021-05-27 Thread Sam Hathaway
On 27 May 2021, at 4:47, Jan Erik Moström wrote: Is it possible to display two files side by side in a window? If so, I can't figure out how (except for using "Find differences"), help? Use case: I've always just opened two windows side by side when I needed this, but when I use Zoom I

Re: Stop adding ^M characters

2021-04-05 Thread Sam Hathaway
If you use Git to collaborate with Windows users, there is some additional complexity to consider: https://www.edwardthomson.com/blog/git_for_windows_line_endings.html Cheers, -sam On 4 Apr 2021, at 21:16, David Kelly wrote: On Apr 4, 2021, at 6:07 PM, Arthur Goldberg wrote: According to

Re: Where Are Prefs for Open Windows in "Windows" Palette Saved?

2021-03-18 Thread Sam Hathaway
On 18 Mar 2021, at 10:10, Bill Kochman wrote: I started this discussion thread with a simple question: Where is the list of open BBEdit windows stored on my hard drive? If you’ll only be satisfied with a direct answer to your exact question, then here: `~/Library/BBEdit/Saved Application

Re: Open a path in a text file

2021-03-14 Thread Sam Hathaway
On 13 Mar 2021, at 18:47, @lbutlr wrote: The "Open" service works, but it pops up a "Bbedit wants to use the restricted service 'open'" every single time, which is almost, but not quite, as annoying as the cope/paste. I made this automator action that, as far as I can tell, does the same

Re: compare two frontmost documents

2020-07-28 Thread Sam Hathaway
Luc, On my copy of BBEdit (version 13.1.2 (414058, 64-bit, sandboxed)) on macOS (version 10.15.6 (19G73)), I see this command under Search > Find Differences > Compare Two Front Windows. Is it possible that you’ve disabled this command under Preferences > Menus & Shortcuts? Hope this

Re: [ANN] BBEdit 13.1.2

2020-07-21 Thread Sam Hathaway
On 21 Jul 2020, at 15:05, RobStevenson wrote: > what does "sandboxed" refer to in the dialog box > that pops up telling me a new version of BBEdit is now > available. http://www.barebones.com/support/bbedit/AppSandboxing.html -- This is the BBEdit Talk public discussion group. If you have a

Re: How to actually set an expert preference?

2020-06-15 Thread Sam Hathaway
Wags, The Expert Preferences page in BBEdit’s “built-in Help book” shows the command to enter for each setting. (Help > BBEdit Help > Expert Preferences) These commands are to be entered in the Terminal. They do not set environment variables so `env` will not help you here. For more

Re: Shebang Line Woes

2020-03-12 Thread Sam Hathaway
Glad I could help, Paul. I like sour beers and belgians. ;-) On 6 Mar 2020, at 14:31, Paul Gobble wrote: Sam, I'll buy you a beer next time I see ya. You figured it out. I resaved as UTF-8 no BOM and it works! Thank you. On Friday, March 6, 2020 at 11:50:23 AM UTC-5, Sam Hathaway wrote

Re: How do you set the python interpreter BBEdit uses?

2020-03-12 Thread Sam Hathaway
I don’t know if this is current best practices, but I’ve always used `/etc/paths` to add directories to my $PATH. This way I’m sure that it applies to all programs, GUI and command-line, running as me or as root. I don’t know what the implications would be for using Conda’s Python outside of

Re: How to jump to a CSS-class from the HTML-file

2020-03-11 Thread Sam Hathaway
Vlad, Look at “Ctags for Enhanced Language Support” in Chapter 14 of the BBEdit User Manual. I haven’t tried it, but the version of ctags bundled with BBEdit _should_ understand HTML, JS, and CSS files. I don’t know if it can understand inline JS and CSS. If it can’t, you can look into

Re: Shebang Line Woes

2020-03-06 Thread Sam Hathaway
art of the Shebang on the MacOS hexdump. What do you see, and what could that mean? Thanks! On Friday, March 6, 2020 at 11:30:30 AM UTC-5, Sam Hathaway wrote: This is very curious. I don’t recognize the formatting in the error message you’re getting when you run it directly. If the shell couldn’t f

Re: Shebang Line Woes

2020-03-06 Thread Sam Hathaway
, if I pass it to /usr/bin/python3 on the command line (the exact same path as in the Shebang) it runs fine. On Friday, March 6, 2020 at 9:58:23 AM UTC-5, Sam Hathaway wrote: Paul, I take it you’re on macOS 10.15 Catalina, since /usr/bin/python3 exists. What do you get if you run this? ls -le

Re: Shebang Line Woes

2020-03-06 Thread Sam Hathaway
Paul, I take it you’re on macOS 10.15 Catalina, since /usr/bin/python3 exists. What do you get if you run this? ``` ls -le@ /Users/.../Scripts/python_test-01.py ``` My suspicion is that macOS might have quarantined your script. (I ran into this once or twice after migrating my data to a

Re: Extracting parts of names from full names

2020-02-27 Thread Sam Hathaway
Do the “last names” in your dataset always consist of the final word before the backslash? If so, you can use: Find: `(.*) (\S+)\\.*` Replace: `\1\t\2` But eventually you will need to deal with names that don’t fit this pattern and then you will be sad. For example, in the name Saúl

Re: Question about GREP search in XML files with weird CDATA fields

2020-02-24 Thread Sam Hathaway
Can you give us a real-world example? I’m not clear on whether “key1” and “key2” literally appear in your document or if they are placeholders. In any case, you should probably use a tool that is designed to work with XML. Such a tool would take care of the CDATA sections for you and let you

Re: Ampersands?

2020-02-17 Thread Sam Hathaway
I agree with Kerri that you need semicolons at the ends of your entities. But to avoid multi-level escaping confusion altogether, use JavaScript string literal unicode escapes in your JavaScript code, like so: ```html ``` Hope this helps. -sam On 17 Feb 2020, at 10:13, jgill wrote: Hi,

Re: Pattern alternation on entire line

2020-02-10 Thread Sam Hathaway
`^` and `$` bind more tightly than `|`. you want ``` ^(s|(e?h?))$ ``` On 10 Feb 2020, at 16:58, Tom Robinson wrote: What have I missed here guys? I want to match entire lines which are empty, contain a single ’s’, or contain ‘e’ and/or ‘h’ (in that order): e h eh s ehs he x The first 5

Re: Selecting the last word of a line

2020-02-03 Thread Sam Hathaway
It’s a little hairy, but this seems to work: Find: `((?:.|\n)*\W)(\w+)` Replace: `\1\t\2` Hope this helps. -sam On 3 Feb 2020, at 10:59, Francisco Hirsch wrote: I have a file with several lines of text. How can I select the last word of the line and inserting a tab in front of it? Thanks

C grunt work - how to automate with BBEdit?

2020-01-28 Thread Sam Hathaway
There are two tasks I end up doing manually in C a lot and I’d like to not. Thing one: putting guards around header files. Any `module.h` should start with: ``` #ifndef MODULE_H #define MODULE_H ``` and end with: ``` #endif /* !MODULE_H */ ``` I usually get a few minutes into writing the

Re: Synchronising location in md file with preview?

2020-01-24 Thread Sam Hathaway
of BBEdit, I'll give it a shot and see how things go. On Wednesday, January 22, 2020 at 4:52:29 PM UTC-5, Maarten Sneep wrote: Hi, On 2020-01-22, at 21:33, Sam Hathaway > wrote: But the bigger problem is: I don’t think BBEdit can accept PDF data from a preview filter. It wants HTML. It mi

Re: Synchronising location in md file with preview?

2020-01-22 Thread Sam Hathaway
In addition to what Patrick mentioned, I’ll add: I don’t think pdflatex is happy writing its output to stdout, or reading from stdin. You might have to write your latex code to a temporary file, call pdflatex, and then open the output file that pdflatex created and send that to stdout. A

Re: Synchronising location in md file with preview?

2020-01-21 Thread Sam Hathaway
Check out Preview Filters. See “Applying Preview Filters” in Chapter 11 of the manual. Hope this helps. -sam On 21 Jan 2020, at 14:00, Christopher Finazzo wrote: I realize this is a pipe dream, but I would love to see something akin to Marked's ability to have a custom script handle the

Re: Search/Replace with GREP wildcards

2019-12-23 Thread Sam Hathaway
On 23 Dec 2019, at 11:44, Charles Nichols wrote: Is it possible to find and delete every instance of Program (PDF) in a file, using wildcards instead of "20141201-IlPreteDISIS", which is a name of a PDF, that will be different for each instance, but always in the pattern "Date-Name"?

Re: GREP question

2019-12-19 Thread Sam Hathaway
What Fletcher said. :-) On 19 Dec 2019, at 13:53, Fletcher Sandbeck wrote: You can think of the pattern as a state machine. It scans forward in the input until the first match in the pattern. In this case the first match is the first "a" in the input so that's where the match starts. The

Re: GREP question

2019-12-19 Thread Sam Hathaway
Putting a `?` after a quantifier like `*` or `+` indicates that you want it to be _lazy_ instead of _greedy_. In short, this means that the quantifier will match the shortest string possible rather than the longest string possible. For example, take the text `aaabaaba`. The pattern `.*b` will

Re: document structure for single-page site development

2019-10-25 Thread Sam Hathaway
I’d say do whatever you need to do to become comfortable organizing your code into multiple files. In the long run you’ll be happier with short files that contain all the code—and only the code—that addresses a particular concern. I would consider a 1000 line file to be exceptionally large and

Re: Markup

2019-10-21 Thread Sam Hathaway
I’m sure our resident applescript fanatic could write you a script. :) But now I’m wondering if there’s a way to apply a snippet to already-existing text. (I don’t use snippets so I don’t know.) Sorry I can’t be of more help. -sam On 21 Oct 2019, at 14:44, Andrew Brown wrote: How can I

Re: [admin] text selection, color

2019-10-21 Thread Sam Hathaway
On 21 Oct 2019, at 10:21, Andrew Brown wrote: How can I convert Here is The Title of a book published in 2009 to this Here is The Title of a book published in 2009 by selecting  **The Title of a book**  and hitting hardly any keys at all? Map a keyboard shortcut to Markup > Font Style

Re: Problem with "Preview in BBEdit"

2019-10-17 Thread Sam Hathaway
Once you have absolute paths and cross-domain assets you’re probably better off running a local web server and previewing in a real browser. I haven’t done this on macOS but I know there are folks on this list who have and who could take you through it. Hope this helps. -sam On 16 Oct 2019,

Re: BBEdit 13: Please, improvements instead of gimmicks

2019-10-11 Thread Sam Hathaway
and replace in selected text only’ checkbox. unless i’m missing something? bruce On Oct 11, 2019, at 7:48 AM, Sam Hathaway <mailto:list.bbe...@munkynet.org>> wrote: On October 11, 2019 3:26:56 AM Gustave Stresen-Reuter tedmaster...@gmail.com <mailto:tedmaster...@gmail.com> wro

Re: BBEdit 13: Please, improvements instead of gimmicks

2019-10-11 Thread Sam Hathaway
On October 11, 2019 3:26:56 AM Gustave Stresen-Reuter wrote: What else would you use discontiguous selections for (serious question)? Lack of multiple selection is one of several things that make me jealous of VSCode/Atom/SublimeText users. In one of those editors, I would change the

Re: [ANN] BBEdit 13 Pricing

2019-10-08 Thread Sam Hathaway
On 8 Oct 2019, at 16:06, @lbutlr wrote: > it always fails to show the amazon payment options > > get around to adding ApplePay > > Fake phone number This sounds like a complaint for supp...@barebones.com. Good luck! -- This is the BBEdit Talk public discussion group. If you have a feature

Re: Delete rest of line starting with some character (how?)

2019-09-04 Thread Sam Hathaway
Find: `^.*\+(.*)-.*$` Replace: `\1` Grep: on On 4 Sep 2019, at 8:28, Gauvins wrote: I often want to delete extraneous characters surrounding the value of interest. Can this be done in one fell swoop? My current workflow is to find/replace with tabs; copy/paste in a spreadsheet; copy the

Re: strip trailing spaces

2019-07-31 Thread Sam Hathaway
On 30 Jul 2019, at 19:27, Nestor Aguilera wrote: I don't want a configuration file in the same directory (where other text files live). Ideally I would like to have some option somewhere before saving the file. Using EditorConfig does unfortunately require adding an `.editorconfig` file

Re: Missing "TYPE" code...

2019-05-09 Thread Sam Hathaway
On 9 May 2019, at 9:16, Rich Siegel wrote: To solve your problem: if you want to make new clippings that will open in BBEdit when you double-click them in the Finder, give them a ".txt" extension. Another possible solution: BBEdit ships with a Service called “Open File in BBEdit”. You can

Re: I did it again-CaSe PrObLeM

2019-05-03 Thread Sam Hathaway
Can we please not relitigate this _again?_ It’s only barely BBEdit related and we’ve been through it at least once before in the time I’ve been on this list. Thanks. -sam On 3 May 2019, at 21:08, Charlie Garrison wrote: Good morning, On 3 May 2019, at 17:07, @lbutlr wrote: Case sensitive

Re: Can I have two documents open same time, side by side?

2019-04-30 Thread Sam Hathaway
On 29 Apr 2019, at 17:18, Richard Pitcairn wrote: I would like to visually compare two documents but can't see how to have both open side by side. Certainly Search > Compare Two Front Windows would work? It places two documents side-by-side and synchronizes their scrolling. Presumably you

Re: Advanced Grep querys

2019-04-26 Thread Sam Hathaway
On 26 Apr 2019, at 16:38, Patrick Woolsey wrote: sometimes it can still be helpful to start with a simple solution and work out from there. Agreed! -sam -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email

Re: Advanced Grep querys

2019-04-26 Thread Sam Hathaway
I’m not sure this can be made to be reliable. Regular expressions can’t balance tags, so: ```html Leave me out! Include me! And me! And also me! But not me. ``` Will result in: ```html Include me! And me! ``` If you make the pattern greedy, you’ll get: ```html

Re: typing surround delimiters... Is single quote supposed to work too?

2019-04-26 Thread Sam Hathaway
Yikes! On 26 Apr 2019, at 14:32, Rails Smith wrote: It need not be the default configuration. It could help maintain a larger paying customer base. I'm about to report a separate bug that makes me wonder how long I will keep paying for BBedit. We have fight club rules here when it comes to

Re: How to get truncated output from RegEx search

2019-04-19 Thread Sam Hathaway
I know this isn’t exactly what you’re asking about, but I wanted to suggest using a tool that’s designed to work with XML rather than with line-oriented text. One such tool is [xml_grep2](https://metacpan.org/pod/distribution/App-xml_grep2/bin/xml_grep2). Installing it on macOS is a little

Re: "tags" file for Text Completion

2019-04-19 Thread Sam Hathaway
at 4:16:43 PM UTC-7, Sam Hathaway wrote: and then copy the resulting tags file to wherever it is that BBEdit wants it. Hmmm the file seems to have been created successfully, but I can't get it to work. BBEdit says "the Completion Data folder contains tags files. These tags files s

Re: "tags" file for Text Completion

2019-04-18 Thread Sam Hathaway
On 18 Apr 2019, at 18:48, Scott in Pollock wrote: On Wednesday, April 17, 2019 at 10:53:23 AM UTC-7, Sam Hathaway wrote: Yeah, that’s the same thing. bbedit --maketags calls an embedded ctags. OK I think I am starting to get this. So you have to run it on a directory with files from

Re: "tags" file for Text Completion

2019-04-17 Thread Sam Hathaway
Yeah, that’s the same thing. `bbedit --maketags` calls an embedded `ctags`. -sam On 17 Apr 2019, at 11:47, Scott in Pollock wrote: Thanks Sam... but I was referring to page 32: "Completion Data This folder does not exist by default, but you may create it. The Completion Data folder contains

Re: "tags" file for Text Completion

2019-04-17 Thread Sam Hathaway
Do you mean a ctags file as detailed in the section “Ctags for Enhanced Language Support” of Chapter 14 of the manual? Here’s the first few lines of my tags file from a rather large C project of mine: ``` !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/

Re: Diving Deep (saving)

2019-04-12 Thread Sam Hathaway
On 11 Apr 2019, at 4:48, Scott in Pollock wrote: short of putting that folder in Finder Favorites Seems like that would indeed be the easiest way. And certainly more transparent than an AppleScript or hotkey. Why not? -sam -- This is the BBEdit Talk public discussion group. If you have a

Re: Remove a specific number of characters at the start of each line?

2019-03-20 Thread Sam Hathaway
Jerry, You’re probably thinking of shell globbing syntax where `?` means “one of any character”. In a regular expression, `.` means “one of any character”. This matches three characters at the beginning of a line: ``` ^... ``` This means the same thing, but is a little more readable: ```

Re: Unexplained boxes on all pages

2019-03-14 Thread Sam Hathaway
I think this rule (on line 635 of `RFCAStyle4.css`) is responsible: ``` div,p,em { margin:5px; padding:1px; background-color:white; border: 1px solid black; } ``` Hope this helps. -sam On 14 Mar 2019, at 10:30, Patricia Scott wrote: Hello again, Forum people, I am still having problems

Re: Grep Alternation and Backreferences

2019-03-08 Thread Sam Hathaway
You could capture both sides of the alternation like this: ``` ((?:Joe|Bloggs){2})\1 ``` But that wouldn’t match `JoeBloggsBloggsJoe` since in that case it would capture `JoeBloggs` and expect to find another instance of `JoeBloggs`. If you wanted to match `JoeBloggsBloggsJoe` you could

Re: Uncomment not the reverse of comment?

2019-03-01 Thread Sam Hathaway
I've had similar issues with BBEdit eating whitespace with C '//' comments. On March 1, 2019 5:22:49 PM Kenneth Bowman wrote: I use BBEdit to edit IDL (Interactive Data Language) files. The comment character in IDL is a semicolon. The language, file suffix (.pro), and comment character are

Re: Edit link without commercial browser name?

2019-02-26 Thread Sam Hathaway
On 26 Feb 2019, at 7:09, bo wrote: My problem is that this copy-paste method has always included my browser name in the link, such as Safari. Is there a way to reduce this link-address, into a more generic form which does not use the Safari name? When I do a Google search and copy the URL,

Re: Meta: mailing list tag in subject line

2019-02-15 Thread Sam Hathaway
On 15 Feb 2019, at 12:10, David Kelly wrote: But its curious one would choose to use a powerful editor such as BBEdit but not master email. Ouch. That’s not very nice. I have mastered email. I have a different workflow than you do. It’s pretty common for mailing lists to have a tag in the

Re: Meta: mailing list tag in subject line

2019-02-15 Thread Sam Hathaway
any extra characters in the subject line, but I could live with those. Of course, you could make similar filters in Mac Mail. All the best, Nestor === On 15 Feb 2019, at 10:15, Sam Hathaway wrote: This came up on another list I’m on and I thought I’d mention

Meta: mailing list tag in subject line

2019-02-15 Thread Sam Hathaway
This came up on another list I’m on and I thought I’d mention it here too. I’d love it if messages on this mailing list arrived with a `[BBEdit]` prefix on the subject line. Most of my other lists have this and it makes it easy to pick out their messages visually when I’m scanning though my

Re: Auto-increase indent

2019-02-14 Thread Sam Hathaway
BBEdit doesn’t do the kind of syntactic analysis that is required for “smart” indentation to work reliably. On 14 Feb 2019, at 14:02, Néstor E. Aguilera wrote: Hi, Languages such as python need indentation after a colon so as to start a new block, which some editors will do automatically:

Re: Expression to copy line containing keyword and also previous and next lines?

2019-02-12 Thread Sam Hathaway
Sorry, I think my email client might have munged that badly. It should be: ``` ^[^\r]*\r[^\r]*(keyword1|keyword2|keyword3)[^\r]*\r[^\r]*$ ``` Cheers! -sam On 12 Feb 2019, at 19:51, Sam Hathaway wrote: Something like this: ^[^\r]*\r[^\r]*(keyword1|keyword2|keyword3)[^\r]*\r[^\r]*$ Hope

Re: Expression to copy line containing keyword and also previous and next lines?

2019-02-12 Thread Sam Hathaway
Something like this: ^[^\r]*\r[^\r]*(keyword1|keyword2|keyword3)[^\r]*\r[^\r]*$ Hope this helps! -sam On 12 Feb 2019, at 19:39, 'David J' via BBEdit Talk wrote: Hi Sam, embarrassing, but in your example “^[^\r]*\r[^\r]*keyword to match[^\r]*\r[^\r]*$” I was leaving “to match” in there

Re: A little grep help

2019-02-12 Thread Sam Hathaway
It's NOT doing the same thing is (?m). Apply your pattern to this sample: Yum yum I munch this text. I get: YuyuImunchthistext. On February 12, 2019 5:38:05 PM "@lbutlr" wrote: On 12 Feb 2019, at 15:29, Sam Hathaway wrote: How exactly are you applying this pattern? Is this i

Re: A little grep help

2019-02-12 Thread Sam Hathaway
How exactly are you applying this pattern? Is this in BBEdit’s find window? I can’t replicate what you’re seeing. (For me it replaces one span of spaces at a time, including any `m` that precedes it.) -sam On 12 Feb 2019, at 17:26, @lbutlr wrote: On 12 Feb 2019, at 06:53, Rich Siegel wrote:

Re: A little grep help

2019-02-12 Thread Sam Hathaway
This would seem to remove any `m` character that is followed by one or more spaces, so I don’t think it _quite_ does what you asked for. Not sure why it would be faster either. -sam On 12 Feb 2019, at 7:38, @lbutlr wrote: I asked someone how to remove all spaces in an string more efficiently

Re: Expression to copy line containing keyword and also previous and next lines?

2019-02-12 Thread Sam Hathaway
Maybe you could give some example text from one of the files. In the multi-file search dialog, make sure that there's no filter selected if you want to search all the files in the folder you've selected. And, of course, make sure the folder you want to search is selected. -sam On February

Re: Expression to copy line containing keyword and also previous and next lines?

2019-02-11 Thread Sam Hathaway
Oh, I forgot to mention that you’d use the “Extract” button to get the matches to a new file. I don’t know anything about multi-file searches (at that point I reach for `grep` instead of BBEdit) but I imagine you’d use Search > Multi-File Search. On 11 Feb 2019, at 12:48, Sam Hathaway wr

Re: Expression to copy line containing keyword and also previous and next lines?

2019-02-11 Thread Sam Hathaway
Try this: ``` ^[^\r]*\r[^\r]*keyword to match[^\r]*\r[^\r]*$ ``` Replace `keyword to match` with the keyword that should appear on the middle line. Hope this helps! -sam On 11 Feb 2019, at 11:23, 'David J' via BBEdit Talk wrote: I’d like to search multiple text files for a keyword, copy

Re: heredoc in worksheet - what is the syntax

2019-01-22 Thread Sam Hathaway
I’m assuming you’re using bash. If you are trying to set a shell variable and then print it out, you will need to do something like this: ```bash SQL=" INSERT INTO mytable (`field1`, `field2`) VALUES ('val1', 'val2') " echo "$SQL" ``` It is possible to use a here document, but it’s not

Re: How to Create Finder Folders from BBEdit Text List

2019-01-16 Thread Sam Hathaway
I generally like to give examples that are as bulletproof as is practical, because I don't know how folks are going to apply them. On January 15, 2019 11:10:54 PM Dave wrote: If you have a space in a folder name, you’ll get two folders unless you quote it. Not what I’d call “blowing up.” I

Re: How to Create Finder Folders from BBEdit Text List

2019-01-15 Thread Sam Hathaway
On 15 Jan 2019, at 8:04, Dave wrote: mkdir accepts multiple arguments, so assuming you have a list of names called “foldernames.txt,” you can just enter: mkdir `cat foldernames.txt` instead of using a loop. This will blow up if your list of folder names is too long, or if your folder names

Re: How to Create Finder Folders from BBEdit Text List

2019-01-09 Thread Sam Hathaway
BBEdit might make this unnecessarily complicated. A shell one-liner would suffice. In the terminal: cd /path/to/base/folder cat /path/to/foldernames.txt | while read; do mkdir "$REPLY"; done You can drag your base folder and text file into the terminal window instead of typing the full paths.

Re: Searching files by number of lines in the file

2018-12-11 Thread Sam Hathaway
Rich’s pattern doesn’t work for me, but this does: ``` \A([^\r]*\r){N}\z ``` Details: ``` match: \A - the beginning of the file (){N} - followed by exactly N of: [^\r]* - zero or more non-linebreak characters \r

Re: Searching files by number of lines in the file

2018-12-11 Thread Sam Hathaway
re sending! Sorry for the confusion. -sam On December 10, 2018 9:58:47 AM "Sam Hathaway" wrote: I don’t know how to do it with BBEdit, but this shell command will work: `find /path/to/files -name fileinfo.php -exec sh -c 'test `cat {} | wc -l` -ne N’ \; -print` Replace `/path/to/

Re: Searching files by number of lines in the file

2018-12-10 Thread Sam Hathaway
I don’t know how to do it with BBEdit, but this shell command will work: `find /path/to/files -name fileinfo.php -exec sh -c 'test `cat {} | wc -l` -ne N’ \; -print` Replace `/path/to/files` with the path to your directory and `N` with your “N”. Hope this helps. -sam On 10 Dec 2018, at

Re: Bug or "Feature"?

2018-10-30 Thread Sam Hathaway
enforcement is almost always handled by the OS (or filesystem driver, or similar), or at least OS-level stuff like the shell. - Steve On Tue, Oct 30, 2018 at 12:31 PM Sam Hathaway wrote: The /tmp symlink itself is 0755, but the directory it points to (/private/tmp) is 1777. I don’t understand

Re: Bug or "Feature"?

2018-10-30 Thread Sam Hathaway
The /tmp symlink itself is 0755, but the directory it points to (/private/tmp) is 1777. I don’t understand why BBEdit needs to check the permissions on the symlink at all. Surely it should follow the symlink and then check the permissions on the link target. In summary, ¯\_(ツ)_/¯ -sam On 30

Re: insert word page next to page #s

2018-10-30 Thread Sam Hathaway
If they always come at the beginning of the line, you could try: Find: `^(\d+)` Replace: `Paragraph \1. ` (note the space at the end Grep: `on` Good luck! -sam On 30 Oct 2018, at 9:22, bo wrote: Wow, thanks so much! This: Find: [\r ](\d+)\r Replace: \rPage \1\r Grep: on This seems to have

Re: insert word page next to page #s

2018-10-30 Thread Sam Hathaway
Thanks for the sample. It looks sometimes the page number is on its own line, and sometimes it’s at the end of a line of text. There’s only one newline after it (not two as in your previous sample) and either a newline or a space before it. So try this: Find: `[\r ](\d+)\r` Replace: `\rPage

Re: insert word page next to page #s

2018-10-26 Thread Sam Hathaway
with the necessity of making his own view clear to himself. On Friday, October 26, 2018 at 9:29:50 AM UTC-4, Sam Hathaway wrote: If you could give us an example input and desire output that would be helpful. -sam On 26 Oct 2018, at 8:45, bo atkinson wrote: Can anyone show me, (new to code editing), how

Re: insert word page next to page #s

2018-10-26 Thread Sam Hathaway
If you could give us an example input and desire output that would be helpful. -sam On 26 Oct 2018, at 8:45, bo atkinson wrote: Can anyone show me, (new to code editing), how to insert the plain word “page” before each page number, of a PDF file? The output from BBEdit can be plain text.

Re: Organizing Docs in a Notebook App and Editing in BBEdit

2018-09-25 Thread Sam Hathaway
On 25 Sep 2018, at 13:42, jamesl...@gmail.com wrote: Atlassian recently said otherwise with respect to GitLab (which I understand is a much-loved free repo). There is limited compatibility, but apparently requires some contortions and sacrifices. Ah, I see. I never use SourceTree’s built-in

Re: Organizing Docs in a Notebook App and Editing in BBEdit

2018-09-25 Thread Sam Hathaway
On 25 Sep 2018, at 13:25, jamesl...@gmail.com wrote: SourceTree forces you to use Atlassian’s Bitbucket repository host I don’t think that’s the case. I’ve used SourceTree with a BitBucket, GitHub, GitLab, and simple SSH-based remote repos. There’s no lock-in. SourceTree is only

Re: Grep for everything between two tags?

2018-08-13 Thread Sam Hathaway
`.*?` worked for me with your sample line. -sam On 13 Aug 2018, at 11:27, Jerry Nilson wrote: Hi, Cannot figure out (new to this) how to write a grep search to match: Where I want to substitute all similar lines with: Thought I could write: .* or possibly with a ?

Re: Google fonts and preview?

2018-07-24 Thread Sam Hathaway
Short answer is change the http to https. Firefox console gives this error: Blocked loading mixed active content “http://fonts.googleapis.com/css?family=Merienda:400,300,700” Read more about it here:

Re: Preview phone/ipad size?

2018-06-13 Thread Sam Hathaway
On 13 Jun 2018, at 14:56, Vlad Ghitulescu wrote: > On 13 Jun 2018, at 20:51, Sam Hathaway wrote: > >> On 13 Jun 2018, at 14:43, Vlad Ghitulescu wrote: >> >>> How to integrate this with BBEdit? >> >> ⌘-S >> >> Solis will detect the changed fil

Re: Preview phone/ipad size?

2018-06-13 Thread Sam Hathaway
On 13 Jun 2018, at 14:43, Vlad Ghitulescu wrote: > How to integrate this with BBEdit? ⌘-S Solis will detect the changed file and reload. Hope this helps. -sam -- This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email

Re: How to Switch Different Python Versions while using BBEDIT

2018-05-24 Thread Sam Hathaway
How are you invoking Python from BBEdit? -sam On 24 May 2018, at 11:43, 'Matthew Miller' via BBEdit Talk wrote: Hello All, I'm fairly new to BBEDIT, and have recently installed two versions of python on my Mac mini. The original version of python installed was 2.7, however, I also wanted to

Re: Multiple replace of highlighted text

2018-05-05 Thread Sam Hathaway
You can make **Replace All** a bit safer for renaming variables by turning on **Case sensitive** and **Entire word**. Hope this helps. -sam On 5 May 2018, at 11:04, Robert wrote: Yeah, I don't know if I would use "replace all" on a large program. I do a lot of short ones where I sometimes

Re: HTML mode confusion

2018-05-04 Thread Sam Hathaway
The BBEdit tag editor is designed to let you edit tag _attributes_ not tag _contents_. The problem with editing _contents_ through the tag editor is that the contents of an tag can include _almost any HTML element_, not just text. So how could the tag editor handle this? It’d have to have

Re: Find and Replace help please

2018-05-02 Thread Sam Hathaway
To delete `###` and subsequent line: Find: `###\r.*\r` Replace: (empty) Grep: on Then, to delete lingering `&&&` line: Find: `&&&\r` Replace: (empty) Grep: off Hope this helps! -sam On 2 May 2018, at 13:25, Matthew London wrote: > Hi, > I have a file with the following: > > > &&& > TEXT

Re: Multiple Find and Replace at once

2018-04-10 Thread Sam Hathaway
I think you can do this with a Text Factory: ![](cid:CDCAE431-6A62-4FCA-9871-85EC1D2FE63A@munkynet.org "Screen Shot.png") Hope this helps! -sam On 10 Apr 2018, at 14:39, Mike W wrote: Is there a search pattern that would be able to do a Multiple Find and Replace at once? I have a large file

Making "Unix Shell Script" syntax highlighting stupider

2018-03-19 Thread Sam Hathaway
Hi folks, Is there a way to get _just_ the comment colors for shell scripts? I don’t really like that BBEdit highlights the names of commands it knows about wherever they appear in a command line. For example, in the line `sudo apt-get install diffstat`, the words `sudo`, `install` and

Re: intention unbalanced quote throwing off colorization?

2018-03-15 Thread Sam Hathaway
Here’s a workaround: ```bash echo $stuff | awk -F $'\x22' '{print $1}' ``` (This will work with most shells, including bash and zsh.) Hope this helps. -sam On 15 Mar 2018, at 12:21, Jeff Grisso wrote: Hello, some of my bash scripts have intentional unbalanced quote and this is throwing off

Re: Dreamweaver CC won't connect to BBedit for local/remote file compare

2018-02-13 Thread Sam Hathaway
My `bbdiff` is in `/usr/local/bin`: ``` sam@shiny ~> which bbdiff /usr/local/bin/bbdiff ``` Maybe you can convince Dreamweaver to look for it there? -sam On 13 Feb 2018, at 12:36, Peter White wrote: Dreamweaver expects to find a file, /usr/bin/bbdiff, but it isn't there. BBedit says the

Re: HTML5 support

2018-01-23 Thread Sam Hathaway
On January 23, 2018 at 4:20:08 PM [-0800], Sam Hathaway wrote in an email entitled "Re: HTML5 support": Re-reading Robert’s original post, it looks like he was indeed asking about the “HTML Tools” palette specifically, not BBEdit as a whole. He wrote: On 18 Jan 201

Re: HTML5 support

2018-01-23 Thread Sam Hathaway
On Tuesday, January 23, 2018 at 4:10:54 PM UTC-8, Sam Hathaway wrote: Just checked in 12.0.2 and indeed “HTML5” is missing from the “Doc Type” popup menu of the “HTML Tools” palette. It is, however, present in the “Document Type” submenu of the “Markup” menu. Go figure! -sam -- This is the B

Re: How to randomize a list?

2018-01-15 Thread Sam Hathaway
On 15 Jan 2018, at 0:46, Vlad Ghitulescu wrote: (sorry for the following dumb questions… I've used Linux last time in 1993! :-) What are the GNU Coreutils good for? Should I install them too? (I've read about the difference in the performance of the various randomizer solutions in the

Re: How to randomize a list?

2018-01-14 Thread Sam Hathaway
, 2018, at 8:50, Sam Hathaway <list.bbe...@munkynet.org> wrote: Make a text filter called Randomize with the contents: #!/bin/sh exec shuf Text filters go in ~/Library/Application Support/BBEdit/Text Filters. I think they probably have to be executable. Running these command in Termina

Re: How to randomize a list?

2018-01-13 Thread Sam Hathaway
Make a text filter called Randomize with the contents: ``` #!/bin/sh exec shuf ``` Text filters go in ~/Library/Application Support/BBEdit/Text Filters. I think they probably have to be executable. Running these command in Terminal should do the trick: ``` cd ~/Library/Application\

Re: Ruby Pipe to BBEdit

2018-01-10 Thread Sam Hathaway
```ruby IO.popen("bbedit", "w") do |subproc| subproc.puts("string for bbedit") subproc.close end ``` On 9 Jan 2018, at 17:54, BeeRich33 wrote: Hiya folks. Just wondering if anybody knows how to pipe a ruby string to bbedit. Once in a while I'd like to send the output of a ruby

Re: Best way to edit hosted website

2017-11-21 Thread Sam Hathaway
On 21 Nov 2017, at 16:40, Tom Robinson wrote: I’m wanting to make changes to around 30 pages on an ISP hosted website; over FTP. I’d prefer to leave the site in the cloud. What’s the recommended approach? Personally I’d keep a copy of the site files on my local machine, edit and test

Re: regular expression replacement with math expressions

2017-11-06 Thread Sam Hathaway
A decent Perl one-liner for this sort of thing would be: ```sh # increment all integers by one perl -i.orig -ple 's/(-?\d+)/$1+1/ge' myfile.txt ``` Hope this helps. -sam On 6 Nov 2017, at 13:32, Fletcher Sandbeck wrote: Some programming languages allow you to specify a function as the

Re: Entering path for Save As filename doesn't go to the path :-(

2017-10-26 Thread Sam Hathaway
When I type '/' in the Save As dialog in BBEdit, the Go to Folder sheet pops up, same as in other Mac apps. Not sure what the problem is. -sam On October 26, 2017 8:44:20 AM EDT, Patrick Woolsey wrote: >On 10/25/17 at 5:22 PM, reflectiv...@gmail.com (Everywhere is

  1   2   >