Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Trim PlusesNew to Visual Studio Code? Get it now.
Trim Pluses

Trim Pluses

Muhammad Luay

|
3 installs
| (1) | Free
Remove leading + signs from selected lines or the whole file.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Trim Pluses

Trim Pluses is a lightweight Visual Studio Code extension that removes leading plus signs (+) from the beginning of each line in the selected text, or the entire document if no selection is made. It's particularly useful for cleaning up diff outputs, versioned changelogs, or other documents with leading markers.


✨ Features

  • 🧹 One-Click Cleanup: Automatically removes all + prefixes from lines in your selection or file.
  • 🔍 Smart Selection Handling: Works on current selections or the full document if nothing is selected.
  • ⚡ Fast and Efficient: Uses native VS Code APIs for quick editing without external dependencies.

🚀 Getting Started

To activate the extension:

  1. Launch the command palette:

    • macOS: Cmd + Shift + P
    • Windows/Linux: Ctrl + Shift + P
  2. Type and select Trim Pluses: Trim Pluses.

Using Keyboard Shortcut:

  • macOS: Shift + Option + T
  • Windows/Linux: Shift + Alt + T

This will remove all leading + characters from the selected lines or the entire document if nothing is selected.


🛠️ Development

To build and run the extension locally:

  1. Install dependencies:
npm install
  1. Build using esbuild:
node esbuild.js
  1. Press F5 in VS Code to open a new Extension Development Host with the extension loaded.

🔍 Project Structure

File/Folders Purpose
src/ Source TypeScript code.
dist/ Compiled output using esbuild.
.vscodeignore Defines what files to exclude when packaging.
esbuild.js Custom build script with problem matcher plugin.
.vscode-test.mjs Config for test discovery.
eslint.config.mjs Linting configuration for TypeScript.
vsc-extension-quickstart.md VS Code generated starter help.

📦 Packaging & Publishing

To bundle your extension:

npx vsce package

To publish (after setting up your publisher):

npx vsce publish
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft