On 08/22/2018, at 18:06, Barbara Snyder <[email protected] 
<mailto:[email protected]>> wrote:
> I have a bunch of open files. I'd like to create a project that includes all 
> open files (without me having to add them individually). Is there a way to do 
> this? Or do I have to enter a feature request?


Hey Barbara,

Save this Bash script to a file here:

~/Library/Application Support/BBEdit/Scripts/


#!/usr/bin/env bash

read -r -d '' asCmdStr <<'EOF'

    tell application "BBEdit" to set fileList to file of text windows whose on 
disk is true

    repeat with i in fileList
        set contents of i to quoted form of (POSIX path of (contents of i))
    end repeat

    set AppleScript's text item delimiters to linefeed
    set fileList to fileList as text

    return fileList

EOF

fileList=$(osascript -e "$asCmdStr");

shCMD="bbedit --project $fileList"
eval $shCMD


Give it a keyboard shortcut or run it by selecting it from the script menu.

Only windows that have been saved to disk will be placed in the new project.

The windows will NOT be closed after the project is created.  At this time 
that's an exercise for the user, although it's doable.

The project will NOT have been saved anywhere, so you'll have to do that 
manually.

> Also, the list of currently open documents near the bottom of the project 
> pane for a new project is blank, and the little clock icon at the bottom 
> (which I assume means recent documents) shows me a single random file that is 
> currently open. So even if I wanted to manually add all the currently open 
> files to the project, I have to do it from the + menu and just select them in 
> the finder, correct? I can't find any other way to add other currently open 
> files to the project. Is there a way?

You can drag files OR BBEdit windows into a project using their icon proxy.

--
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
"[email protected]" 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to