Notepad++ tips and tutorials

Enhance your productivity in Notepad++ with these helpful tips, tricks, and step-by-step tutorials.


What you will learn about Notepad++

You will learn to:

  • Remove duplicate lines.
  • Auto-complete HTML tags.
  • Compare files.
  • View files side by side.
  • Open a file in new window.
  • Remove plugins.
  • Add a word to the beginning or the end of each line.
  • View how many files are open.
  • Remove empty (blank) lines.

Notepad++

Notepad++ is a free and open-source text and source code editor.


How to remove duplicate lines in Notepad++

You can delete identical lines from a text file (TXT) or remove duplicate lines from other files, such as HTML and XML files.

  1. Click Edit located in the top menu of Notepad++.
  2. Go to Line Operations.
  3. Click Remove Duplicate Lines.
    Remove duplicate lines in Notepad++

Notepad++ will now remove duplicate lines.


How to auto-complete HTML tags in Notepad++

  1. Click Settings located in the top menu of Notepad++.
    Notepad++ settings
  2. Click Preferences.
    Notepad++ preferences
  3. Click Auto-Completion.
    Notepad++ Auto-Completion settings
  4. Check the html/xml close tag option.
    Auto-complete HTML tags in Notepad++
  5. Click Close.
    Close Notepad++ preferences

Notepad++ will now automatically complete/close HTML tags.

You might need to restart Notepad++.


How to compare files in Notepad++

  1. Click Plugins located in the top menu of Notepad++.
    Notepad++ Plugins
  2. Click Plugins Admin.
    Notepad++ plugins admin
  3. Type compare in the search field.
    Search for the Comprare plugin in Notepad++
  4. Select the Compare plugin.
    Select the Compare plugin in Notepad++
  5. Click Install.
    Install the Compare plugin in Notepad++
  6. Click Yes.
    Install the Compare plugin in Notepad++
  7. Notepad++ will now install the plugin and restart. When Notepad++ is finished, you open the files you want to compare.
  8. Click Plugins located in the top menu of Notepad++.
    Notepad++ Plugins
  9. Go to Compare and then click Compare.
    Compare files in Notepad++

Notepad++ will now compare the files.


How to view files side by side in Notepad++

Method 1

  1. Right-click on the tab of a file.
  2. Go to Move Document.
  3. Click Move to Other View.
    View files side by side in Notepad++

Notepad++ will now show the files side by side.

Method 2

  1. Click View in the top menu of Notepad++.
  2. Go to Move/Clone Current Document.
  3. Click Move to Other View.
    View files side by side in Notepad++

Notepad++ will now show the files side by side.


How to open a file in a new window in Notepad++

Method 1

  1. Right-click on the tab of the file.
  2. Go to Move Document.
  3. Click Open in New Instance.
    Open a file in a new window in Notepad++

Notepad++ will now open the file in a new window.

Method 2

  1. Click View in the top menu of Notepad++.
  2. Go to Move/Clone Current Document.
  3. Click Open in New Instance.
    Open a file in a new window in Notepad++

Notepad++ will now open the file in a new window.


How to remove plugins from Notepad++

  1. Click Plugins located in the top menu of Notepad++.
    Notepad++ Plugins
  2. Click Plugins Admin.
    Notepad++ plugins admin
  3. Click Installed.
    Notepad++ installed plugins
  4. Select the plugin you want to remove.
    Select the Notepad++ plugin you want to remove
  5. Click Remove.
    Remove plugin from Notepad++
  6. Click Yes.
    Remove plugin from Notepad++

Notepad++ will now remove the plugin.


How to add a word to the beginning or end of each line in Notepad++

  1. Press the Ctrl + H keys on your keyboard to open the 'Replace' dialog.
  2. Choose the Regular expression option at the bottom of the dialog.
    Notepad++ Replace dialog Regular expression
  3. Type ^ in the Find what field if you want to add the word to the beginning of each line. Type $ in the Find what field if you want to add the word to the end of each line.
    Notepad++ Replace dialog Find what field
  4. Type the word in the Replace with field. If you need space between the word and the rest of the words, add a space after or before the word.
    Notepad++ Replace dialog Replace with field
  5. Place the mouse cursor in the first line of the file to ensure all lines are affected.
    Place mouse cursor in first line of file
  6. Click the Replace All button.
    Notepad++ Replace All button

Notepad++ will now add the word to the beginning or end of each line.


How to view how many files are open in Notepad++

  1. Click on Window located in the top menu.
    Notepad++ window menu
  2. Click on Windows.
    Notepad++ windows menu
  3. At the top of the next window, you can see how many files are open in Notepad++.
    View how many files are open in Notepad++

How to remove empty (blank) lines in Notepad++

  1. Click on Edit located in the top menu.
  2. Go to Line Operations.
  3. Click Remove Empty Lines.
    Remove empty lines in Notepad++