CRC-Aliases VSCode Extension
This extension is designed to help you work with alias files by providing syntax highlighting and other useful features to come in later releases.
- Custom Dot Commands: Highlighted in Green.
- Native Dot Commands: Highlighted in Red.
- Variables: Highlighted in Purple.
- Variable Arguments: Highlighted in Yellow.
- Alias Functions: Highlighted in Blue.
Getting Started
- Download and install Visual Studio Code.
- Install the "CRC-Aliases" extension from the VSCode Marketplace.
- Report issues here.
Using the Extension
- Temporarily rename your alias file extension to
.alias instead of .txt . Example: ZZZ_commands.txt.alias
- Open your alias file in Visual Studio Code.
- The extension will automatically apply color coding:
- Green for custom dot commands.
- Red for native dot commands.
- Purple for variables.
- Yellow for variable arguments.
- Blue for alias functions.
This color coding helps you easily identify different parts of your alias files, making it easier to read and edit them.
Upon initial loading of the extension, if the colors do not look exactly correct:
- Navigate to the extensions menu. This may be found to the left of the screen; Looks like 4 squares together with the top-right square separated.
- Ensure the "INSTALLED" list is expanded.
- Find the "CRC Aliases" extension and left click on the settings (gear) icon.
- Select "SET COLOR THEME"
- At the top of the screen, select "ALIAS COLOR THEME".
For Developers
Installation
Clone the repository:
git clone https://github.com/KSanders7070/vs_code_crc-aliases_extension.git
Install the dependencies:
npm install
Open the project in Visual Studio Code:
code crc-aliases
Note: Alternatively, you could use the LAUNCH_VScodeExt.bat file in the route directory.
Press F5 to open a new VSCode window with the extension loaded.
Open your alias file with the .aliases extension.
Syntax Highlighting
This extension uses specific scopes to highlight various components of alias files:
- Custom Dot Commands (
keyword.other.alias-command )
- Native Dot Commands (
keyword.control.native-dot-command )
- Variables (
variable.parameter.alias-variable )
- Variable Arguments (
variable.parameter.alias-argument-variable )
- Alias Functions (
variable.parameter.alias-function )
You can find these settings in the alias.tmLanguage.json and Alias Color Theme.json files.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy!
| |