Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Comment ToggleNew to Visual Studio Code? Get it now.
Comment Toggle

Comment Toggle

Liam (Jianliang) Gao

|
1 install
| (0) | Free
Adds Shift+Ctrl+C to toggle comments with # on selected lines
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Comment Toggle Extension

This Visual Studio Code extension allows users to quickly add a # character to the beginning of each selected line of code in the programming languages that use # for line comments (e.g., R, Python).

Features

  • Adds # to the start of each line in the current selection.
  • Works with multiple selections.
  • Useful for commenting out blocks of code in languages that use # for line comments (e.g., R, Python).

Usage

  1. Select one or more lines of code.
  2. Run the command "Add # to Each Line" from the Command Palette (Ctrl+Shift+P).
  3. Or use the keyboard shortcut Ctrl+Alt+C.

Installation

You can install this extension manually by downloading the .vsix file and running:

code --install-extension line-commenter-0.0.1.vsix

Enjoy!

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