Notepad++: Word Count, Comment Out Multiple Lines, and More

In this post, you’ll see:

Here, I’m using Windows 11. Let’s start.

How to Find Word Count on Notepad++

Note: Notepad doesn’t have a word count feature. But WordPad has it.

Notepad++ has a word count feature that displays the number of words in the document. You can find the word count of a Notepad++ document as follows:

Open Notepad++ document and hit View at the top. Click on the Summary option, and on the Summary popup, you can view the document’s word count besides Words.

That’s all.

Alternatively, you can accomplish this task by following these steps:

Open the document in Notepad++. Double-click the length and lines in the status bar at the bottom, and in the Summary popup, you’ll find the total number of words in the document.


How to Comment Out Multiple Lines in Notepad++

You can comment out multiple lines in Notepad++ by following these steps:

Open Notepad++ document. Select the lines you want to comment out and press Ctrl + Shift + Q or click Edit > Comment/Uncomment > Block Comment.

That’s all. You can uncomment lines by selecting them, and after that, click Edit > Comment/Uncomment > Block Uncomment.

The alternative ways are as follows:

Method #1

To comment, select the lines and press Ctrl + Q. If you want to uncomment multiple lines at once, use this key combination after selecting the lines.

Method #2

Select the lines. For comment – Press Ctrl + K. For uncomment – Press Ctrl + Shift + K. That’s all.


How to Remove Duplicate Lines in Notepad++

Open Notepad++ file. Hit Edit at the top. Hover your mouse over Line Operations above Comment/Uncomment. You now have two options:

  • Remove Duplicate Lines – will eliminate duplicate lines from the document.
  • Remove Consecutive Duplicate Lines – this will remove duplicate lines that are consecutive.

Click on the one you prefer. That’s all.

Notes:

To duplicate the line, follow these steps: Go to the line you want to copy. Press Ctrl + D. That’s all.

Alternate Method

Go to the line you want to duplicate. Hit Edit at the top. Hover your mouse over Line Operations, which you can find above Comment/Uncomment. Click on the Duplicate Current Line option, and that’s it.


How to Remove Blank Lines from Notepad++

Method #1

Open Notepad++ file. Hit Edit at the top. Hover your mouse over Line Operations, located just above Comment/Uncomment. Now you can see these two options:

  • Remove Empty Lines – this will remove blank lines.
  • Remove Empty Lines (Containing Blank characters) – which will delete blank lines that include blank characters such as “Space.”

Click on the one you prefer. That’s all.

Method #2

This method removes spaces from the beginning of the lines and blank lines, including blank characters. To do this, use Replace. Here’s how:

Press the keyboard shortcut Ctrl + H to open the “Replace” popup. Select “Regular expression” in the “Search Mode” section.

In the field beside “Find what,” type this: ^\s

Hit the Replace All button. That’s all.


How to Enable Syntax Highlighting in Notepad++

Notepad++ has syntax highlighting disabled by default. You can enable this feature, and here’s how:

Open Notepad++. Hit Language at the top. Hover your mouse over the first letter of the programming language you are using.

For example, if you’re using Java, hover over J.

Now you can see the programming language and click it. That’s all. Syntax highlighting is on. Click Language at the top and click None (Normal Text) to disable syntax highlighting.

Also, note: 

If you save a file with a programming language extension in Notepad++, Notepad++ automatically enables syntax highlighting for that file.

For example, if you work with HTML code and save it as a .html file, Notepad++ will apply syntax highlighting to this file.

Also, note that if you open a programming language file in Notepad++, Notepad++ automatically enables syntax highlighting for that file. That’s it.


How to Disable Autocomplete in Notepad++

Notepad++ comes with autocomplete enabled by default. You can disable it, and here’s how to do it:

Open Notepad++ and hit Settings at the top. Click on Preferences, and select Auto-Completion in the Preferences popup. Uncheck Enable auto-completion on each input.

That’s it. You can enable the autocomplete by selecting the “Enable auto-completion on each input.”

Also, keep in mind:

From these three options, you can select the one you want autocomplete for:

  • Function completion (only for functions)
  • Word completion (only for words)
  • Function and word completion (for both functions and words).

You can also specify the number of characters (1 to 9), after which the autocomplete list will appear. Ignore numbers – if selected, Auto-Completion ignores the number.

Function parameters hint on input – if this option is selected, it means you’ll see the parameters of a function as a hint while using it.