Notepad++ is the most popular text editor for Windows, and we love its speed and power, but it's even better once you dig a little deeper. Here's a look at the many ways you can use Notepad++ more effectively.
The end result may not be a novel or short story, but writing code is still an artform we consider worth highlighting during our writing week.
Type Less, Write More
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.
You can automate more complex tasks by using a plugin called Quick Text. After installing this plugin, select Plugins >> QuickText >> Options. Here we will define hotstrings to be replaced with user-defined text. Hotstrings are a fantastic way to speed up the writing process. Under the languages pane, select Global, then specify a tag name. Input the text you'd like to replace this hotstring with in the Substitution text field. After clicking OK, any time the tag is typed and followed up with a press of the tab key, the QuickText plugin works its magic. What makes this text replacement tool even more effective is the $ operator acting as a cursor focus. After pressing the tab key, the cursor will automatically go to the first $ position in the substitution text. You can even use it multiple times and advance to the next one by pressing tab again.
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.
Organise Your Workflow
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. Say, for example. you're working on a project that requires frequent editing of five files. Rather than opening these up repeatedly, you can choose 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.
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, or just pressing Alt+S. If the file you're editing is hosted on an SVN repository, Compare also allows you to compare against the SVN copy, by selecting Compare to SVN Base or by pressing Alt + B.
Customise to Your Liking: Auto-Saving, FTP Syncing and Code Highlighting
Auto-Save Your Text We've already covered Auto-Save, which 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.
Automatically Sync with an FTP Server
My personal favourite plugin is NppFTP, found through the Plugin Manager under Plugins. Once installed, you can choose to show the FTP sidebar. From here you can setup profiles for different FTP servers on which you'd like to keep your documents. This is great for those of us who have files saved on a server, but would like the ability to save immediately to the server, or download from the server quickly within Notepad++. This setup works great for web developers because often you only require minor changes to a file or two, and Notepad++ offers syntax highlighting of these files to boot!
For other great plugins, be sure to browse the Notepad++ Plugin Manager. You can find even more Plugins by selecting Get More Plugins from the Help Menu.
Install User-Defined Custom Highlighting and Tweak the Style
If you develop software of any type, you may have noticed the coloured syntax highlighting in your documents. In most cases, 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 out the List of User Defined Files, which provides over 50 additional options and instructions for installation.
If you're not too fond of the way Notepad++ looks, or you're just in the mood for a little change, there are some tweaks you can choose through the Style Configurator. This tool is located 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.
Finally, if you'd like to ditch Notepad for Notepad++ completely, The How-To Geek covers this very process.