Sublime Forum

Shortcut for "Reveal in Side Bar"

#1

Inside a text file I can right click and select “Reveal in Side Bar”, but the command doesn’t seem to exist in the cmd-p menu, and I’m not sure if there’s a way to make a shortcut for the command.

I’m working on a project with many folders and files (it’s not the way I would normally organize things, but this kind of organization is mandated by the company), so I need to use the “reveal in side bar” functionality quite often.

How can I create a shortcut for it?

0 Likes

#2

Here’s a tip:

If you open the ST console (View menu -> Show Console) and type/paste sublime.log_commands(True) Enter and then right click in the main text area and select Reveal in Sidebar, you’ll see in the console the name of the command being executed.

command: reveal_in_side_bar {“event”: {“x”: 821.5, “y”: 311.5}}

So you can just create a Default.sublime-commands file in your Packages/User folder with the following contents to add it to the Command Palette:

[
  { "caption": "Reveal in sidebar",
    "command": "reveal_in_side_bar",
  },
]

see also:
https://packagecontrol.io/packages/Missing%20Palette%20Commands

2 Likes

#3

What I have:

    {
        "keys": ["alt+shift+e"],
        "command": "reveal_in_side_bar"
    },
1 Like

#4

Thanks! That was very helpful!

1 Like