I'm not sure if somebody else has already submitted this or not, the trello board won't load for me, and I'm not even sure if this the right place to do this but it can't hurt.
I would love to see a keyboard shortcut that would allow me to switch which view is active. I love the vertical split idea so I can see two documents at once, but it seems inconvenient that I need my mouse to switch focus between them.
@Tessag159 You can assign them with User Key map easily. Just Select User Key Map from Debug menu and paste the following key bindings. Then, reassign the keys to whatever you want.
"Ctrl-1": "cmd.splitViewNone",
"Ctrl-2": "cmd.splitViewVertical",
"Ctrl-3": "cmd.splitViewHorizontal"
Update: actually, the key bindings above only allow you to switch between different split views, but not to set focus from one view to the other. So we still don't have any command to switch focus between split views.
@Tessag159 You can use Ctrl-Tab to navigate between recent documents, including switching across panes. There's also my File Navigation Shortcuts extension, which lets you switch to any open document quickly by typing a few characters of its name.
It should also be pretty easy for someone to write an extension that specifically jumps focus to a given pane (or toggles focus between the two panes -- unlike Ctrl-Tab regardless of whether the other pane's document was recently focused before or not). I'll mark this 'extension idea' in case anyone wants to implement that.
@Tessag159 you could also write an extension which registers a key to toggle between the two panes.
The code below should do it but I haven't tested it. You'll need to wire that up to a keyboard command. For that refer to the hello-world sample: https://github.com/adobe/brackets/wiki/Simple-%22Hello-World%22-extension
function switchPanes() {
if (MainViewManager.getPaneCount() > 1) {
var activePane = MainViewManager.getActivePaneId(),
paneIds = MainViewManager.getPaneIdList(),
index = paneIds.indexOf(activePane) + 1;
if (index >= paneIds.length) {
index = 0;
}
MainViewManager.setActivePaneId(paneIds[index]);
}
}
Thank you guys so much, I'll get around to seeing if any of these suggestions work just as soon as I can.
Has anyone done any more work on this? I am a new developer and I thought I'd give this a try, but I don't want to duplicate efforts if an extension is already in progress.
I haven't done anything with it, and I doubt anybody else has either. Go ahead and give it a shot.
I've wrote extremly simple extension for toggling panes:
https://github.com/ivan1810/moving-between-splitted-windows
You can install it through extension manager.
Does it solve your problem?
I'd love to see this feature in the core too. Tagging as starter bug.
Hi @petetnt , Can I try adding this feature in the core? Thank you!
@arthur801031 Sure thing!
See the article How to hack on Brackets to get started with the Brackets codebase. If you have any questions, feel free to post them here! We also have a Slack channel for day-to-day communication. (You can join by sending a mail to [email protected] with the subject line slack registration request specifying the email addresses you would like to register).
Hi @petetnt I've added this feature in the core. Please let me know if I need to make any changes. Thank you very much.
Fixed/added in #12853
It's not clear to me how or where this has been incorporated. Is there now a default shortcut for switching panes?
Yeah, Brackets updated it so that it is included in the core package now. I believe the shortcut key is Alt + W
I'm on Mac. There are shortcuts for moving from one document to another in the document list, but I don't see anything for switching between the two open panes.
@ronherrema which version of Brackets are you using? Have you tried without extensions? Alt+W works for me on MacOSX with Brackets 1.9 (and latest master).
If it still doesn't work, check the developer tools (Debug -> Show Developer Tools -> Console) if there are any warnings of duplicate keyboard shortcuts. It might also be that another program is blocking the command, in which case you can update the keymap.json to change the shortcut.