Snippets in Notepad++

I’m a massive fan of Notepad++, the lightweight Windows based text editor, it has a tiny footprint but packs enough features to make it my go-to Windows text editor. Up until quite recently however, I’d been missing snippets, but not any more.

I’ve been using Notepad++ for a few years now, but had always been frustrated by it’s productivity stifling lack of a good snippet plugin; until I discovered QuickText . This awesome little plugin by João Moreno perfectly and elegantly fills the hole I had been feeling for so long.

It’s very simple to use: simply enter a keyword; hit Ctrl+Enter and it automagically expands into your predefined text snippet. You can obviously add as many snippets as you’d like via the Options panel (Plugins > QuickText > Options…).

My only quibble with this little gem is the way it uses the $ character to denote initial cursor position. Once your snippet has been added to your document the cursor is placed at the first $ character in your snippet. Fair enough you might say, that’s a nice way of jumping to the relevant portion of a function, but it results in a problem: JavaScript (among others) uses this character in several important ways, so QuickText removing them all from your snippet (as it does) means a not inconsiderable pain in the ass adding them again.

Note: Myself and several other people have had initial problems getting QuickText to actually replace the keywords with the snippet (Ctrl+Enter did nothing). The problem is that a recent Notepad++ update also uses that keyboard shortcut, so there is a conflict which needs to be resolved before QuickText will work. What you do is go Settings > Shortcut mapper, then click on the Plugin Commands tab and scroll to near the bottom. You’re looking for ‘Replace Tag’, once you’ve found it define a new shortcut (I use Alt+Enter) and restart Notepad++. Everything should now be fully functional.