Overview
The Dope extension helps you write code faster and more easily. It offers features like autocompletion, quick navigation, and useful code snippets to improve your workflow.
Installation
To install the extension, follow these simple steps:
- Open Visual Studio Code.
- Go to the Extensions view by clicking on the square icon in the sidebar or pressing
Ctrl
+Shift
+X
.
- Search for "Dope".
- Click on the "Install" button.
Usage
Autocompletion
The extension provides seamless autocompletion for all features defined in src/Scenario.js
. When you type this.features.
, it dynamically suggests a list of all available features, making it faster to write code and reducing the likelihood of typos.
Commands
To bring up the Command Palette, use the following shortcuts:
- Mac:
Shift
+Command
+P
- Windows/Linux:
Ctrl
+Shift
+P
Once the Command Palette is open, type "Dope" to access the following commands:
- Create New Feature: Quickly create a new feature.
- Jump To State Declaration: Navigate to a specific switch case state in the Scenario.
- Jump To Feature Initialization: Navigate to a specific feature initialization in the Scenario.
- Jump To Method Implementation: Navigate to a specific method in the Scenario.
Additional Features
Keyboard Shortcuts
By hovering over a feature, you can use these shortcuts:
F12
: Navigate to the feature’s initialization.
Ctrl
+F12
: Jump to the feature class implementation.
Shift
+F12
: Look up all references to the feature.
Code Snippets
The extension includes several handy snippets for common tasks, such as:
event
: Creates an event listener for a specific feature event.
spin
: Provides a fallback for accessing the current spin’s game properties.
statget
: Gets the status for a specified type.
statset
: Sets the status for a specified type and value.