Notepad++ is a free text editor that comes with a lot of cool features. This posts discuss about some of my favorite Notepad++ tips and tricks.

  • Configure Notepad++ to use spaces instead of tabs
    Go to the Preferences menu command under menu Settings, and select Language Menu/Tab Settings, depending on your version. Earlier versions use Tab Settings. Later versions use Language. Click the Replace with space check box. Set the size to 4.
  • Open the find and replace dialog
    Press CTRL+H
  • Replace “\n” with new line characters
    Hit Ctrl-H to open Replace dialog. Fill out the following values as shown below and the most important, make sure you select the Extended (\n, \r, \t, \0, \x, …) radio button.

    Example : “Line \\n lin \\n”
  • Move file to other view
    Open the two files which you want to edit simultaneously. Right click on any one file’s tab and then select Move to other view which will split the screen into two for each of the file.
  • Switching between vertical and horizontal split in side by side
    To switch between vertical Horizontal, right click on the bar which splits the views (right and left) and then select Rotate to Left or Rotate to Right.
  • Select columns to columnar delete, insert or replace some character
    Alt + drag.
  • Find CLRF character using regular expression [\r\n]+
  • Show line ending character
    Go to View > Show Symbol  > Show End Of Line
  • Show White Space and Tab
    Go to View > Show Symbol  > Show White Space and Tab
  • Select range of lines
    1. Ctrl + G, enter line number say 1000.
    2. Go to Edit menu and select Begin/End select.
    3. Press Ctrl + G again, to go to another line say 2000.
    4. Go to Edit menu and select Begin/End select.
  • Find and delete line using Regular Expression
    1. Go to Mark from the top menu, as shown in below image
      Search -> Mark
    2. Enter the search term in Find what as shown in below image.
    3. Enable the checkbox Bookmark line
    4. Enable the checkbox Regular expression (under Search Mode)
    5. Click Mark All (this will find the regex and highlights all the lines and bookmark them)
    6. Follow below menu to delete selected lines
      Search → Bookmark → Remove Bookmarked Lines
      Mark tab Notepad++