NotePad++


Select range of lines in Notepad++ using line numbers 13

In response to a question in this post we proposed the following method to select a range of lines in Notepad++ using the line numbers:

  1. Press Ctrl + G, type the start line and hit Enter to go to the start line.
  2. Then go to the menu, click on Edit and then Begin/End select.
  3. Press again Ctrl + G, and type the end line number and hit Enter to go to it.
  4. Back to the menu, click on Edit and then Begin/End select once more.
    By now you will have your range of lines selected.

NotePad++: Remove multi-line (/**/) comments automatically 4

We are going to use NotePad++ replace functionality (CTRL+H) to remove all multi-line comments that are enclosed in a pair of /* and */.

While in the source file you want to edit, open up the ‘Replace’ window either from the ‘Search’ menu or by using CTRL+H.

Set ‘Search Mode’ to ‘Regular expression’ and tick the ‘. matches newline’.

In the ‘Find what:’ input type /\*(.*?)\*/\n and leave the ‘Replace with:’ input empty.

NotePad++ Remove Multi-Line CommentsTo find the next comment, you can click the ‘Find Next’ button and then hit ‘Replace’.

To make the change on all comments just hit ‘Replace All’.