Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Eclipse it is possible to comment out multiple lines by selecting them and executing CTRL + /:

// helloworld

Is this possible in Notepad++ as well instead of typing // in front of an individual multiple lines?

share|improve this question

4 Answers 4

up vote 25 down vote accepted

Select desired lines and then press CTRL+Q. This will toggle comments on and off.

Also, I've just recently become a fan of ALT + Left Mouse Click to select multiple lines and just manually comment those lines with //.

I've found the ALT + Left Mouse Click trick to work well with Visual Studio, JetBrain products, Notepad++ but not Eclipse.

share|improve this answer
The ALT + LMC and subsequently // works in .scala as well. To uncomment: ALT + LMC and subsequently two times DEL – Alfred Jul 30 '14 at 20:01
For the curious, alt + shift + a toggles block selection mode in eclipse – VitaminYes Dec 4 '14 at 17:11
Select multiply lines and Ctrl+Q is faster than multiline select and // – Pacerier Jun 30 at 2:57
"This will toggle comments on and off" as VitaminYes wrote. If you want to re-commment the commented lines, see @john-robertson 's response – malarres Sep 16 at 14:20

In notepad++ I believe that the shortcut is CTRL+Q for commenting the code.

You can go to Settings > Shortcut Mapper to change this to match your preference.

The default for a block comment is CTRL+SHIFT+Q. So you can highlight the block of code then use this shortcut.

share|improve this answer
Ok I will check this and let you know the outcome – Alfred Jul 30 '14 at 19:34
CTRL + SHIFT + Q results in /* */ in a .java file – Alfred Jul 30 '14 at 19:40
These are the different comments for different languages. Here is a list of supported languages natively in Notepad++: – Dan Smith Jul 30 '14 at 19:42
So how do you uncomment in HTML? – Patrick Szalapski Sep 22 '14 at 13:20
@DanSmith, Dam I can't uncomment the commented code. What's the opposite of Ctrl-Shift-Q? – Pacerier Jun 30 at 3:00

Also CTRL+K works well in Notepad++ to comment. If you had existing comments in a long block you are commenting, CTRL+Q will uncomment your actual comments, where CTRL+K just add another level of // in front. CTRL+SHIFT+K removes a single line comment from the selection.

share|improve this answer
This is a Ctrl-Q bug actually. If there are half commented lines and half uncommented lines, Ctrl-Q should comment them all, then uncomment them all, then comment them all again. – Pacerier Jun 30 at 3:09
Verified that CTRL+K works as well to comment out in Notepad++ – Alfred Jul 18 at 18:56

Use ctrl + shift + Q for multiline comments and ctrl + Q for single line comments.

share|improve this answer
Welcome to Super User! This duplicates another answer and adds no new content. Please don't post an answer unless you actually have something new to contribute. – DavidPostill Oct 23 at 21:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.