Plugin that modifies text using shell utilities.
Implemented using napi-rs - a framework for building compiled Node.js add-ons in Rust via Node-API.
- src/ - contains extension source functions that interact with VSCode API
- custom_command/ - contains Napi project with Rust source files that will be build into native module for Node.js
- Go to project directory:
cd ./plugin_rs- Install extension dependencies
npm install- Build Rust module:
cd custom_command- install dependencies with
yarn install- install
napicli
npm install -g @napi-rs/cli- build module
napi build --platform --releaseWhen plugin is built, it can be run in debug mode to test functionality.
- Open
extension.tsin VSCode and run with F5. - Select text to modify and open
Command Paletteby pressingCtrl+Shift+Por by navigating toView->Command Palettein VSCode menu. - Select
CustomTextModification: Modify text with utilityand select command from history or type command in window.
- Install Visual Studio Code Extensions command line tool
vsce:
npm install -g @vscode/vsce- Build extension package:
vsce package- Run in VSCode:
- switch to
Extensionspanel - select
Install from VSIXin menu - select .vsix package created by previous command
Implemented with plain TypeScript.
- src/ - contains extension source functions that interact with VSCode API.
- Go to project directory:
cd ./plugin_ts- Install extension dependencies
npm installWhen plugin is built, it can be run in debug mode to test functionality.
- Open
extension.tsin VSCode and run with F5. - Select text to modify and open
Command Paletteby pressingCtrl+Shift+Por by navigating toView->Command Palettein VSCode menu. - Select
CustomTextModification: Modify text with utilityand select command from history or type command in window.
- Install Visual Studio Code Extensions command line tool
vsce:
npm install -g @vscode/vsce- Build extension package:
vsce package- Run in VSCode:
- switch to
Extensionspanel - select
Install from VSIXin menu - select .vsix package created by previous command