Vscode: Shortcut to Reveal file in sidebar

Created on 7 Mar 2017  路  4Comments  路  Source: microsoft/vscode

Hi,

  • VSCode Version: 1.10.1
  • OS Version: macOS Sierra

I'm not able to set a keyboard shortcut to reveal a file in a sidebar. It is possible only for Reveal file in a Finder.

How can I achieve that? I don't want to have "auto reveal" option set to true, but writing "cmd+shift+p reve Down Down Enter" is a bit lengthy.

Maybe making this action public could help? "_workbench.action.files.revealInExplorer" :) Not sure ;)

Thanks for your suggestions.

*question

Most helpful comment

You can assign your own keyboard shortcut to the command workbench.files.action.showActiveFileInExplorer to achieve this

Example:
``
{
"key": "ctrl+q",
"command": "workbench.files.action.showActiveFileInExplorer",
"when": "editorTextFocus"
}
```

All 4 comments

Well, from code base I incidentally found out that the action could be invoked also from editor tab context menu :+1: But having a shortcut could be also great ;) Thanks.

You can assign your own keyboard shortcut to the command workbench.files.action.showActiveFileInExplorer to achieve this

Example:
``
{
"key": "ctrl+q",
"command": "workbench.files.action.showActiveFileInExplorer",
"when": "editorTextFocus"
}
```

Aaaaha. Didn't find that command. Thanks for your response.

No problem, Happy Coding!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ozsay picture ozsay  路  247Comments

Perkovec picture Perkovec  路  191Comments

Tyriar picture Tyriar  路  314Comments

niagr picture niagr  路  246Comments

Brakkar picture Brakkar  路  364Comments