Notepad++

INTRO – Why NPP

Notepad++ is the most popular text/source code editor. It features syntax highlighting, code folding and limited autocompletion for programming, scripting, and markup languages, but not intelligent code completion or syntax checking.
We love its speed and power, but it’s even better once you dig a little deeper.

Macros

One of the killer features for Notepad++ is the ability to automate those trivial things we have to write on a daily basis. To do this with macros, simply click the record button on the toolbar and perform the task. For example, if you wanted to delete every other character in a document, you would click right, right, then backspace. After doing this once, click the stop button to finish recording your macro. Press play each time you want this action performed, or click the fast forward button to initiate the action multiple times. You can even save a created macro for further use, by assigning it one of the many available keyboard shortcuts found under the save macro button.

Column Editing

Another interesting feature you won’t find in your everyday text editor is Column Editing. You can invoke column selection by holding down the Alt key while selecting text. From here you can cut, copy, paste, insert, and delete, just as you would with normal text selection. Furthermore, you can insert Variable Text in these column selections. By default, Notepad++ allows you to insert an initial number with an incremental value, so that you can create numbered lists on the fly.

Project Management, Tabulated

Notepad++ has the ability to save your current working state, and it also benefits from tabbed browsing. You can use this more to your advantage by creating sessions. File >> Save Session and specify a name and file extension for this project. When you’d like to bring this project up again, just select File >> Open Session and navigate to this project file. Your project files will be intact from the last time you saved them. By default Notepad++ treats your open tabs as a session, and loads that session up after restarting the application.

File Comparison

Often you may want to have two files open side-by-side rather than tabbed in one window. To split the application window, select one of the documents of interest, right click, and choose Move to Other View. If you’d like to create another version of the same file, select Clone to Other View. On a related note, you can also compare the contents of the last two tabs open using Compare from the plugins menu. This can be useful for code revisions or rewrites in general. Furthermore, with Compare you can even compare your current file with the previous save by selecting Compare to Last Save

Custom Highlighting and Tweak

The programming language detection is automatic, but you can change it if necessary through the languages menu. If the language you require is not included by default, check online for over 50 additional options and instructions for installation

Plugins

Extensive list of plugins to do anything one wishes.
Examples:
QuickText – Here we will define hotstrings to be replaced with user-defined text.
Compare – compare two notes side-by-side. This can be useful for code revisions or rewrites in general. Furthermore, with Compare you can even compare your current file with the previous save by selecting Compare to Last Save, or just pressing Alt+S
Autosave – it should be the first plugin you set up (it’s included with install, so you have no excuse). You can choose to save all open tabs, or the current one on a timed interval, or simply when Notepad++ loses focus.

Styling

Under Settings on the Menu bar. From here you can select an included theme, but you certainly aren’t limited to these. You may define your own globally, or limit it to specific languages. You can also change the default font from here (which I usually do, as Courier New’s 1’s tend to look an awful lot like lowercase L’s). You can do a little bit more tweaking from the Preferences menu, also found under Settings. From here, you can check the Vertical checkbox to load the tabs on the side. You can also choose to hide the menu bar, revealing it with the Alt key.
New theme cam be created at C:\Users\user_name\AppData\Roaming\Notepad++\themes

Configs

Recently opened files quickly

You can get up to 15 files in the list with the actual path. If you think that this feature is useful, and you want to increase the number of “Recently Opened” files, here is a trick to increase or decrease the number. Open Settings > Preferences. Under the Recent Files History, you will get the option to change the number.

Workspace and Treeview

If you are developing a theme, obviously there are more than one files. It is quite difficult to open and close different files in a particular folder. To solve this problem, Notepad++ has an awesome feature called Folder as Workspace, which helps users to view all the files and folders in the tree view. You can see a sidebar on the left-hand side that will let you open a particular folder and file. To open a folder, click on File > Open Folder as Workspace

Tasks and Functions

Find text and replace in multiple files

Select Search > Find in Files from the menu. If you like keyboard shortcuts better, use Ctrl-Shift-F to open the search window instead. The find in files configuration window is pretty easy to use as you can ignore most options if you don’t require them. You can also use regex and the replace option to replace the text you entered with other text.

Find changes side by side

If you have made few changes in a particular file or say you want to make two instances of a single file. To do this, open or create the file that you want to place side by side or make another instance. Then, right-click on the tab and select Clone to Other View.
Any two files can be compared with the COMPARE plugin also.

Box selection

Box selection means that text can be selected vertically as well as horisontally. Really cool. You need to hold down the Alt key while doing a selection; you can select a block horizontally.

Run in browser

You can test html file in browser by clicking RUN and select Launch in Browser.

Align Lines

It’s my favorite feature. You can line up multiple lines by ,(comma), = (equal sign) or clipboard character. It is very useful and helpful in Box selection. (needs TextFX plugin)

Handy RegEx

[ ] – The square brackets can be used to match ONE of multiple characters. For instance, [abc] matches any of the characters a, b or c. Ranges can also be used, [a-z]

^ – The caret can be used inside the square brackets to exclude characters from the match. For instance, hell[^o] means the string ‘hell’ will be ignored if followed by the letter ‘o’. Another example is [^A-Za-z] which will exclude all alphabetic characters.

$ – This matches the end of a line.

. – The period or dot matches any character.

\d – Matches any single digit.

\w – Matches any single alphanumeric characters or underscore.

\s – Matches whitespaces including tabs and line breaks.

* – The asterisk or star sign matches 0 or more times. For example, Ba*m matches Bm , Bam , Baam etc.

+ – The plus sign matches 1 or more times. For example, lo+l matches lol , lool , loool etc.

\< – Matches the start of a word. For example, \< directly followed by ‘sh’ matches ‘she’ but does not matches ‘wish’.

\> – Matches the end of a word. For example, sh\> matches ‘wish’ and does not matches ‘she’.

( ) – The round brackets can be used in the Find & Replace function to tag a match. tagged matches can then be used in replace with \1, \2 etc. For example, If you write 123xxxRRR in the search and 123\1HHH in the ‘Replace with’ filed, the result will be: 123xxxHHH.

\ – The backslash can be used to escape regex characters. For example to match 1+1=2, the correct regex is 1\+1=2. Otherwise, the plus sign will have a special meaning.

Search for number of digits and add a dot at the end:
Find: (\d\d)
Replace: \1.

Remove a dot at te end of any line:
Find: [.]\r
Replace: leave blank