Navigating folders and files in a project sidebar from the keyboard?

1,347 views
Skip to first unread message

Brian Christiansen

unread,
Mar 5, 2018, 6:08:18 PM3/5/18
to BBEdit Talk
Hello,

After searching the user manual (love that thing) and this group, I can't find anything on getting around within the sidebar without taking my hands off the keyboard. 

What I am picturing is,

1. Key combo to shift focus to the sidebar
2. Keys to move through the hierarchy, in the manner of navigating the Finder from the keyboard.
3. Perhaps CMD-O to open a file
4. Key combo to shift focus back to the editor pane.

Am I just missing it? I've wanted to do this for years, and have never gotten around to asking. The majority of my work is within Projects, so for me the Sidebar is there 95% of the time.

Thank you,
~brian

F. Alfredo Rego

unread,
Mar 5, 2018, 10:09:01 PM3/5/18
to bbe...@googlegroups.com
Hello Brian,

I use Keyboard Maestro with great success for these kinds of challenges.

Enjoy!

Alfredo

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@barebones.com" 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 bbedit+un...@googlegroups.com.
To post to this group, send email to bbe...@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Patrick Woolsey

unread,
Mar 6, 2018, 2:50:34 PM3/6/18
to bbe...@googlegroups.com
There is an expert pref which you can set to allow the file list
to gain keyboard focus. Cribbing from the "Expert Preferences"
page of the Help book:
========

Projects

* In project windows, the file list does not accept keyboard
focus by
default, unless the editing view is hidden. You can modify
this so
that the file list gets the focus whenever you click on it:

[ by issuing the following Terminal command on a single
line ]

defaults write com.barebones.bbedit
ProjectsListCanAcquireKeyboardFocus -bool YES

========


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>

F. Alfredo Rego

unread,
Mar 6, 2018, 5:33:49 PM3/6/18
to BBEdit Talk
Thanks, Patrick for the useful cribbing.

Any tricks for getting the focus on the [project’s] file list WITHOUT having to click on it (i.e., without taking our hands off the keyboard)?

We want to save EVERY calorie that we can.

Alfredo

DavidWeinberger

unread,
Mar 7, 2018, 10:26:51 AM3/7/18
to BBEdit Talk
I'm not sure if this is what you're looking for, but CMD + OPT + Left or Right Arrow Key moves around the Currently Open Documents pane in the Projects list. No need to shift focus to it first. 

Note that if you use that keyboard shortcut, the list of projects in the top pane does not update to highlight the file currently in the editor, but the name in the Currently Open Docs pane does. I'd missed that until I asked Support about it. D'oh!

- David W. 

Christopher Stone

unread,
Mar 7, 2018, 7:52:06 PM3/7/18
to BBEdit-Talk
On 03/06/2018, at 16:33, F. Alfredo Rego <F.Alfr...@gmail.com> wrote:
Any tricks for getting the focus on the [project’s] file list WITHOUT having to click on it (i.e., without taking our hands off the keyboard)?


Hey Alfredo,

Control-Tab

Control-Shift-Tab

--
Best Regards,
Chris

F. Alfredo Rego

unread,
Mar 7, 2018, 9:34:45 PM3/7/18
to BBEdit Talk
Hey Chris,

These two shortcuts work great.

Thanks!

Alfredo 

Brian Christiansen

unread,
Mar 10, 2018, 11:25:53 AM3/10/18
to BBEdit Talk
> defaults write com.barebones.bbedit ProjectsListCanAcquireKeyboardFocus -bool YES

Patrick, thank you. Now I have to struggle with whether I actually like this or not. Because the Project sidebar is instant-activation, by which I mean, it opens the file as soon as it's highlighted. So if I want to arrow down 10 files to open the 10th, I wind up opening 1–10. On first experiment, I opened 30 files in 1.5 seconds, unintentionally. ("This is why it's not enabled by default behavior", Patrick thinks to himself.)

However, playing with this in the Currently open documents pane, that I've liked a lot.

> CMD + OPT + Left or Right Arrow Key

David! How are you. Do you write your books in BBEdit? Thanks for the note. I had this set to Opt+Cmd+ [ & ] -- mimicking the browser shortcut to switch between open tabs. I just switched it to use the arrow keys after realizing that combo is not a text control combo like opt+right-arrow or cmd+right-arrow. I'll try this for a bit and see how it feels. Thanks!

> Any tricks for getting the focus on the [project’s] file list WITHOUT having to click on it (i.e., without taking our hands off the keyboard)? We want to save EVERY calorie that we can. 

Yes, sir, Alfredo! Ever since I read this one StackOverflow post about Vim years ago, I've been on a quest to use BBEdit in a similar fashion… when I'm in code, I want to pretend the mouse does not exist (or in my case, trackpad.)

> Control-Tab
> Control-Shift-Tab

Thank you, Chris! This one is completely new to me.

I appreciate everyone's input.

Best,
~brian
@briandigital

Rich Siegel

unread,
Mar 10, 2018, 11:34:14 AM3/10/18
to bbe...@googlegroups.com
On 3/6/18 at 5:33 PM, F.Alfr...@gmail.com (F. Alfredo Rego) wrote:

>Any tricks for getting the focus on the [project’s] file list
>WITHOUT having to click on it (i.e., without taking our hands
>off the keyboard)?

If you have a project open, try "Open File by Name" and type the
first few characters of the file name. You can drive the entire
process from the keyboard.

R.
--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <http://www.barebones.com/>

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

F. Alfredo Rego

unread,
Mar 10, 2018, 12:07:22 PM3/10/18
to BBEdit Talk
Rich,

Nice, BUT the file opens in a new window. How about just “activating” it within the Project’s “Currently Open Documents”?

I appreciate discovering all of these no-so-obvious jewels.

Thanks.

Alfredo

Patrick Woolsey

unread,
Mar 10, 2018, 12:12:59 PM3/10/18
to bbe...@googlegroups.com
On 3/9/18 at 6:11 PM, bri...@gmail.com (Brian Christiansen) wrote:

>>defaults write com.barebones.bbedit ProjectsListCanAcquireKeyboardFocus -bool YES
>
>Patrick, thank you. Now I have to struggle with whether I
>actually like this or not. Because the Project sidebar is
>instant-activation, by which I mean, it opens the file as soon
>as it's highlighted. So if I want to arrow down 10 files to
>open the 10th, I wind up opening 1–10. On first experiment, I
>opened 30 files in 1.5 seconds, unintentionally. ("This is why
>it's not enabled by default behavior", Patrick thinks to himself.)
>
>However, playing with this in the Currently open documents
>pane, that I've liked a lot.

Apropos of when BBEdit opens files, there is an accessory pref
as follows:

=======
Projects

[...]

* Project windows will ordinarily open an item in the file
list for
editing when you click on it and the editing view is
visible. To
require a double-click:

[ please issue the following Terminal command ]

defaults write com.barebones.bbedit
ProjectsOpenItemsOnSingleClick -bool NO

=======

so you may wish to apply it as well. :-)


>>Control-Tab
>>Control-Shift-Tab
>
>Thank you, Chris! This one is completely new to me.
>

FWIW you can use these key shortcuts to switch between panes
within a window in (nearly) every Mac application.

F. Alfredo Rego

unread,
Mar 10, 2018, 12:24:35 PM3/10/18
to BBEdit Talk
Very Nice, Patrick.

Is there a compact/terse list of all of these great “accessory prefs” somewhere?

Thanks.

Alfredo

Lee Hinde

unread,
Mar 10, 2018, 12:29:37 PM3/10/18
to bbe...@googlegroups.com
Look for Expert Preferences in BBEdit Help (under the Help Menu).

F. Alfredo Rego

unread,
Mar 10, 2018, 1:17:43 PM3/10/18
to BBEdit Talk
Thanks, Lee, but that’s not a “compact/terse list”. Nonetheless, following your hint, I decided to extract the espresso (using BBEdit as my espresso machine, of course) and here it is.

To suit your taste(s), you can add your preferred amount of textured milk to produce a macchiato, a cappuccino, a latte, or a venti. I hope it’s useful to everyone.

Enjoy.

Alfredo

BBEdit Expert Preferences (espresso) 180310.txt

Barbara Snyder

unread,
Feb 6, 2019, 7:23:06 PM2/6/19
to BBEdit Talk
Hi - I know these messages are old, but I am running into the same issues. But nothing suggested here works WRT using the keyboard. Cmd-Option-arrows doesn't seem to do anything. Neither do the ctrl-tab options.

What I want to do is use the keyboard to select a different file from the project file list.

I ran all the recommended expert preferences. This one didn't work (a single-click still displays the file): 

defaults write com.barebones.bbedit ProjectsOpenItemsOnSingleClick -bool NO


I'm also not sure what the difference between opening for edit and revealing is, but this also didn't seem to do anything.

defaults write com.barebones.bbedit AutoRevealSelectedDocumentInProjectList -bool YES


In any case, all I am looking for is keyboard control of the project's file list.

Thanks -- Barbara

Patrick Woolsey

unread,
Feb 7, 2019, 11:14:11 AM2/7/19
to bbe...@googlegroups.com
On 2/6/19 at 7:23 PM, bar...@signalfx.com (Barbara Snyder) wrote:

>What I want to do is use the keyboard to select a different
>file from the project file list.
>
[...]

There is an expert prefs option which you can set to obtain this behavior.

Cribbing from the "Expert Preferences" page of the online help
(Help -> BBEdit Help):

================

Projects

* In project windows, the file list does not accept keyboard focus
by default, unless the editing view is hidden. You can
modify this
so that the file list gets the focus whenever you click on it:

[ by issuing the following Terminal command ]

defaults write com.barebones.bbedit
ProjectsListCanAcquireKeyboardFocus -bool YES

================

Having made the above change, you may further wish to enable the
next option to prevent keyboard navigation "over" files from
automatically opening them:

================

Projects

* In project windows, the file list does not accept [ ... ]

* Project windows will ordinarily open an item in the file list
for editing when you click on it and the editing view is visible.
To require a double-click:

[ just enter the following Terminal command ]

defaults write com.barebones.bbedit
ProjectsOpenItemsOnSingleClick -bool NO

================

(PS: Since the latter option does work :-) please check to
ensure you've entered the command exactly as it appears above.)


Regards,

-- Patrick Woolsey

bruce linde

unread,
Feb 7, 2019, 12:11:05 PM2/7/19
to 'John Springer' via BBEdit Talk
i have no memory of ever doing this, but must have… it’s a brilliant feature i use all the time.
as usual: thx, barebones!   8-)






--
This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email

"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://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 bbedit+un...@googlegroups.com.
To post to this group, send email to bbe...@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.





bruce linde
5 happiness webmaster (four more than the competition!)
http://www.5happy.com/
http://www.5happy.com/blahg
510.530.1331 office (and best place to leave messages)
510.206.9730 mobile

(shift key available upon request)






Barbara Snyder

unread,
Feb 7, 2019, 1:06:06 PM2/7/19
to bbe...@googlegroups.com
Yes I did all of these. I copied and pasted so I know I did it correctly. Just did it again. Figured out what i was doing wrong with the double-click (they were all already open, duh).

I still can't find any way to get focus into the project sidebar via the keyboard. If I am in the editor, I have to click into the sidebar to navigate through the files in the project.

Similarly, if I select or click on the name of an already open file in the sidebar, so it shows in the editor, I don't know how to get from the sidebar into the editor via a keyboard command.

Thanks -- Barbara


> On Feb 7, 2019, at 8:13 AM, Patrick Woolsey <pwoo...@barebones.com> wrote:
>
> --
> This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email
> "sup...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
> --- 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/t5szJm2_Mgg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to bbedit+un...@googlegroups.com.

Christopher Stone

unread,
Feb 7, 2019, 1:33:33 PM2/7/19
to BBEdit-Talk
On 02/07/2019, at 12:06, Barbara Snyder <bar...@signalfx.com> wrote:
I still can't find any way to get focus into the project sidebar via the keyboard. If I am in the editor, I have to click into the sidebar to navigate through the files in the project.

Similarly, if I select or click on the name of an already open file in the sidebar, so it shows in the editor, I don't know how to get from the sidebar into the editor via a keyboard command.


Hey Barbara,

Control-Tab

Shift-Control-Tab

Personally I think Bare Bones should provide a settable keyboard shortcut for these.

(Submit a feature request if you agree.)

In the meantime I have a couple of macros in Keyboard Maestro.

--
Best Regards,
Chris

Patrick Woolsey

unread,
Feb 7, 2019, 2:06:01 PM2/7/19
to bbe...@googlegroups.com
For the record, Control-Tab and Control-Shift-Tab are standard
(macOS-wide) window navigation gestures. :-)


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>



On 2/7/19 at 1:33 PM, listm...@suddenlink.net (Christopher
Stone) wrote:

>On 02/07/2019, at 12:06, Barbara Snyder <bar...@signalfx.com> wrote:
>>I still can't find any way to get focus into the project sidebar via the keyboard. [...]
>>
>>Similarly, [...] I don't know how to get from the sidebar into the editor via a keyboard command.

Barbara Snyder

unread,
Feb 7, 2019, 2:18:46 PM2/7/19
to bbe...@googlegroups.com
That isn't working for me. I checked all my keyboard shortcuts and macros in other places (like mac settings and Keyboard Maestro), and I do not have those keys mapped to anything that might be conflicting. They move me among the stuff in the sidebar (icons on bottom etc) and to other windows I might have open (like Find) but never plop me into the editor. Except when it lands me in scratchpad.txt. It's just weird.

IOW if I am in the sidebar and navigate to the name of a document that is open, I can never get from there to the editor via the keyboard.

What commands do you use in KM to get to the correct window?

Thanks -- Barbara

Christopher Stone

unread,
Feb 7, 2019, 3:22:20 PM2/7/19
to BBEdit-Talk
On 02/07/2019, at 13:18, Barbara Snyder <bar...@signalfx.com> wrote:
IOW if I am in the sidebar and navigate to the name of a document that is open, I can never get from there to the editor via the keyboard.


Hey Barbara,

Control-Tab to get from the Editor into the sidebar.

Control-Shift-Tab to get from the sidebar to the editor.

Continuing to press one or the other of these will move you serially between the editor, the Project File panel, the Currently Open Documents panel, and the Worksheet & Scratchpad panel.

--
Best Regards,
Chris

Barbara Snyder

unread,
Feb 7, 2019, 3:45:13 PM2/7/19
to bbe...@googlegroups.com
OK maybe my terminology is inexact.

I am in the list of files (top left of sidebar).

I click or use the keyboard to navigate to an open document, which now shows up in the editor window.

I want to use the keyboard to place my cursor in the open document. 

After more futzing, I have finally determined that I have to use Ctrl-tab 3 times to get into the document, then ctrl-shift-tab 3 times to get back to the file list.

Is that as designed?

Thanks -- Barbara

P.S. At least now I have an idea what I can do in Keyboard Maestro!


Christopher Stone

unread,
Feb 7, 2019, 4:58:35 PM2/7/19
to BBEdit-Talk
On 02/07/2019, at 14:45, Barbara Snyder <bar...@signalfx.com> wrote:
I am in the list of files (top left of sidebar).

I click or use the keyboard to navigate to an open document, which now shows up in the editor window.

I want to use the keyboard to place my cursor in the open document.


Hey Barbara,

Right.

As I said – Control-Shift Tab – moves you FROM the sidebar TO the document being edited.

Control-Tab moves you FROM the document being edited TO the FILES part of the sidebar.

--
Best Regards,
Chris

Barbara Snyder

unread,
Feb 7, 2019, 5:06:40 PM2/7/19
to BBEdit Talk
Brian --

What I have discovered (noted earlier) is the following: 

If I am in the editing window, pressing ctrl-shift-tab THREE times gets me to the list of files at the top of the sidebar. 

Then I can use arrow keys to go up and down, and press Enter to open (if the file is not already open).

Then ctrl-tab THREE times gets me back to the editing window.

-- Barbara

Brian Christiansen

unread,
Feb 7, 2019, 8:18:54 PM2/7/19
to BBEdit Talk
Thanks, Barbara. I appreciate you sharing what you’ve learned. I haven’t been working in BBEdit projects of late, but I’ll tuck this away next time I’m back at it!
--

@lbutlr

unread,
Feb 7, 2019, 10:27:08 PM2/7/19
to BBEdit Talk
On 7 Feb 2019, at 14:58, Christopher Stone <listm...@suddenlink.net> wrote:
> As I said – Control-Shift Tab – moves you FROM the sidebar TO the document being edited.
>
> Control-Tab moves you FROM the document being edited TO the FILES part of the sidebar.

This is confusing. I now what you are talking about and I am confused.

control-tab moves you "forward" in the cycle of possible focal areas in the window. There are four of these, so if you hit control-tab four times, you will cycle through them all.

control-shift-tab moves you backwards in the cycle.

So, wherever you are, hitting any combination of these will return you to where you are:

o ctrl-tab then ctrl-shift-tab
o ctrl-shift-tab then ctrl-tab
o ctrl-shift-tab ctrl-shift-tab ctrl-shift-tab ctrl-shift-tab
o ctrl-tab ctrl-tab ctrl-tab ctrl-tab

This will work the same in other windows with multiple areas as well, but the numbers may change.

Also, these are system-wide keys, not simply BBEdit keys, so you may find them useful in other applications. They may not do what you expect. For example, in Messages, they move up and down the list of conversations. In Mail, in a composition window, they do nothing. In the Finder they ALMOST do nothing.

In the Mail browser window they move through various parts of the UI, but do not cycle around so at the start you can only move forward and at the end you can only move forward.

--
I WILL NOT HIDE BEHIND THE FIFTH AMENDMENT Bart chalkboard Ep. 7F18

@lbutlr

unread,
Feb 7, 2019, 10:29:08 PM2/7/19
to BBEdit Talk
On 7 Feb 2019, at 20:27, @lbutlr <kre...@kreme.com> wrote:
>
> and at the end you can only move forward.

brain-o, backward, of course.


--
I thought that they were angels, but to my surprise, we climbed aboard
their starship, we headed for the skies.

Kerri Hicks

unread,
Feb 8, 2019, 8:59:38 AM2/8/19
to bbe...@googlegroups.com
Barbara, if you go to System Preferences -> Keyboard -> Shortcuts, do you have the radio button at the bottom set to "All controls"? 

Changing it to "Text boxes and lists only" may change the behavior you're describing, so you only have to hit that key chord once, not three times, to change focus in BBEdit.

--Kerri

--
This is the BBEdit Talk public discussion group. If you have a
feature request or need technical support, please email
"sup...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <https://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 bbedit+un...@googlegroups.com.

Barbara Snyder

unread,
Feb 8, 2019, 1:08:28 PM2/8/19
to bbe...@googlegroups.com
Ah, yes I do, but I probably did it for a reason at some point in the distant past. Just turned it off and restarted BBEdit, but the behavior didn't change. Weird....

When I have time I can try restarting my Mac and see if that makes a difference.

Thanks -- Barbara
Reply all
Reply to author
Forward
0 new messages