canOpenr - The little opener that can
A VS Code extension that allows the user to open files outside of the current workspace.
Supported features
- Multiple root folders
- Pattern for inclusion
- Pattern for exclusion
- Search depth from root folder
Getting started
- Download and install the extension from marketplace
- Restart VS Code
- Press CTRL+ALT+P (Win/Linux) or CMD+OPTION+P (Mac) to bring up the search palette and quickly open a file from your home directory
Configuration
When not configured, the extension provides a default configuration which is equivalent to the example below.
By default, canOpenr will search for any file directly in the user's home folder. Your existing files.exclude
and search.exclude
configuration are observed.
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true
},
"canOpenr.search": [
{
"root": "<home>",
"include": ["*"],
"exclude": [],
"maxDepth": 1
}
]
The extension supports multiple root folder and search patterns. Here is an example of configuration:
"canOpenr.search": [
{
"root": "<home>",
"include": ["*"],
"exclude": [],
"maxDepth": 1
},
{
"root": "<folder1>",
"include": [".*"],
"exclude": [],
"maxDepth": 2
},
{
"root": "<folder2>",
"include": [
"*.xml",
"*.json"
],
"exclude": [
"**/node_modules",
"**/*.log"
],
"maxDepth": 3
}
]
This configuration will search for file in:
- home folder: any file directly in home
- folder1: any file that start with
.
in folder1
and its sub folders
- folder2: any
.xml
or .json
file in folder2
and its first and second level sub folders
Credits
Icon made by Nikita Golubev from www.flaticon.com