Switch-A-Roo
Overview
Switch-A-Roo simplifies the file-switching process by enabling you to define custom file type associations and utilize keyboard shortcuts to navigate directly to a specific file type or cycle through all configured types.
Features
- Customizable File Type associations
- Keyboard shortcuts to cycle through all File Types
- Create shortcuts to open specific File Types
Usage
- First define your File Types:
Sample Configuration
// settings.json
{
"switch-a-roo.fileTypes":[
{ "name": "Template", "endsWith": ".html" },
{ "name": "Component", "endsWith": ".ts" },
{ "name": "Styles", "endsWith": ".css|.scss|.sass" },
]
}
- With the File Types defined, the following commands are available:
- Previous File Type (
Alt + ,
)
- Next File Type (
Alt + .
)
Open a file matching one of your File Types and execute these commands to easily cycle through all types in the order they appear in your configuration.
You can create a keyboard shortcut to open a specific File Type directly by assigning a command
for that File Type:
// settings.json // There are 9 commands available
"switch-a-roo.fileTypes":[ // command_n
{ "name": "Template", "endsWith": ".html", "command": "command_1" },
{ "name": "Component", "endsWith": ".ts", "command": "command_2" },
{ "name": "Styles", "endsWith": ".css|.scss|.sass", "command": "command_3" },
],
Then assign the keybinding:
// keybindings.json
[
{ "key": "f4", "command": "switch-a-roo.command_1" },
{ "key": "f5", "command": "switch-a-roo.command_2" },
{ "key": "f6", "command": "switch-a-roo.command_3" },
]
Extension Settings
switch-a-roo.fileTypes
: Array of user-defined File Types.
- File Type properties:
name
- Unique, friendly name for your File Type
endsWith
- String used to compare against the full file path to identify the File Type. Multiple matching values can be specified by separating with a pipe (ex: ".css|.scss|.sass")
command
- (optional) name of preset command to associate with File Type. This allows assignment of a keyboard shortcut to "Go to File Type"
switch-a-roo.enableLogging
: Enables logging to the Output pane. Helpful for debugging your configuration.
Feedback and Support
If you have any questions, encounter issues, or want to provide feedback, please email me at me@BizzyBob.com.