How do I uncomment lines in an XML file using Notepad++

62,723

Solution 1

If you have the XML Tools plug-in, you can use the following shortcuts for block commenting/uncommenting:

  • Ctrl+Alt+Shift+C — comment selection

  • Ctrl+Alt+Shift+R — uncomment selection.

As for the Ctrl+Shift+K shortcut not working, you should probably report the problem to the Notepad++ developer.

Edit: Looks like the standard Block comment (Ctrl+K), Block uncomment (Ctrl+Shift+K) and Toggle block comment (Ctrl+Q) commands don't work with XML at all. (I'm using v. 5.5 by the way.)

Solution 2

Ctrl-Q uncomment on current line / selection

Ctrl-K comment on current line / selection

Solution 3

I had the situation to remote comments from a properties / ini file.

used the reg expression ^.#.$ to search and replace with blank (see here http://www.shareaschnitzel.com/delete-a-line-containing-certain-string-or-text/ )

next steps remote blank lines.

This might help you to remove comment from a text file

Share:
62,723

Related videos on Youtube

gardenofwine
Author by

gardenofwine

Updated on September 17, 2022

Comments

  • gardenofwine
    gardenofwine over 1 year

    I can comment lines easily enough with Ctrl+Shift+Q. How do I uncomment the lines? Ctrl+Shift+K doesn't do it.

  • alex
    alex over 14 years
    Maybe Ctrl+Shift+k has been remapped.
  • Helen
    Helen over 14 years
    No, I haven't found any other command with this shortcut assigned. The appropriate menu command (Edit -> Comment/Uncomment -> Block uncomment) also doesn't work, so it must be a problem with Notepad++.
  • Matt Lachman
    Matt Lachman almost 13 years
    For me, Ctrl + Alt + Shift + R was dual mapped to "Launch in Chrome". I ended up deleting that shortcut since I'll use it far less often.
  • Toto
    Toto over 4 years
    Why did you copy/paste (partially) previous answer?