Wraps the selected text into triple backticks fence:
Look for "Markdown Wrap in Triple Backticks" in the command palette.
Select the text to wrap and press
ctrl+E is usually already binded, you need to open the bindings editor (
ctrl+s) and unbind.
To set your own shortcut, add this to your
Initial release of the extension.
Source Code Editing
- Navigating to Your Project: Navigate to your project directory in the terminal.
- Opening in VS Code: Open the project in Visual Studio Code if it's not already open.
- Installing Dependencies: If you've added new dependencies or are working on a different machine, you'll need to reinstall the npm packages.
Building the Project
Or, for continuous compilation:
if tsc is installed locally (
npm install --save-dev typescript) and not globally (
npm install -g typescript), run:
Testing the Extension
- Running the Extension: To test your changes, you can run the extension in a new Extension Development Host window.
F5 in VS Code to start debugging and open a new window where your extension is activated.
Insert Breakpoints: Insert breakpoints in your code within VS Code to debug it.
Inspect Output: Use
console.log() statements for simple debugging, and inspect the Output panel (
Ctrl+Shift+U) in the Extension Development Host window.
- Update Version: Before republishing your extension, remember to update the version number in
To package your Visual Studio Code extension, you can use the
vsce command-line tool, which is designed to help you manage VS Code extensions. Here are the steps to package your extension:
vsce if you haven't yet:
npm install -g vsce
- Navigate to your extension directory:
- Install Dependencies: Make sure all dependencies are installed. This usually means running:
- Package the Extension: Run the following command to package your extension into a
After running this command,
vsce will package your extension into a
.vsix file. This
.vsix file is what you'll upload to the Visual Studio Marketplace if you decide to publish your extension. Alternatively, you can install it manually using this
To install a
.vsix manually, open Visual Studio Code, go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window. Then click the "..." at the top of the Extensions view, choose "Install from VSIX..." and select your
You can also install it from the command line:
code --install-extension your-extension.vsix
Remember to replace
your-extension.vsix with the actual file name of your
- Publishing the Extension: If you've made changes that you want to publish, use the
npm install -g vsce) package to publish the extension to the marketplace.