Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Copy Selection With Minimal Indention
Copy Selection With Minimal Indention

Copy Selection With Minimal Indention

Andreas Pardeike

|
168 installs
| (0) | Free
This extension allows you to copy part of your source code in a way that allows you to paste it nicely into a chat message or a forum. It will strip away any common prefixed whitespace/characters and works with disjoined selections. Simply use instead of a normal copy selectio...
Download

Copy Selection With Minimal Indention

When you have code that is deeply indented and you want to post part of this code in Discord, GitHub or StackOverflow or anywhere else for that matter, you probably want to remove the unncessary indentation.

Example usage

Note: This video shows the extension in Visual Studio Code but the functionality is the same

Usage

This extension adds a new menu in Tools > Copy Selection With Minimal Indention that you use instead of the normal Copy command. When chosen, it will remove any extra indentation and if you hold the SHIFT key while choosing the menu, it will wrap the copied text with the common triple backslashes including the content type so you can simply paste it without any extra work.

Visual Studio Code

If you want the same functionality in Visual Studio Code, install it from here: https://marketplace.visualstudio.com/items?itemName=pardeike.copyselectionwithminimalindention

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