NppSnippets plug-in for Notepad++
NppSnippets is a plug-in for Notepad++. It adds the possibility to add code snippets to the current document by simply selecting it from a list.
To download version 1.3.0, click here.
How to install
NppSnippets.dll to the
plugins directory, copy
NppSnippets.sqlite to the
plugins/Config directory in your AppData directory and restart Notepad++.
How to use
To open the Snippets window, click on the "Jigsaw" button on the toolbar, or via the menu "Plugins" -> "Snippets" -> "Snippets".
The window consist of two parts. A combo where you can select the library and underneath there is the list of snippets in the chosen library. To insert a snippet simply double click on the item in the list and the snippet is inserted at the current cursor position.
When you switch to another document with another language the snippets for that new language are read from the database.
For more documentation see the ReadMe.pdf that is included in the original archive.
This plugin is released under the GPL2-license. The source code can be found at GitHub.
Version 1.3.0 (30 June 2013)
- Fixed problem with inserting UTF snippets (issue #3).
- Fixed wrong title of Import Library dialog.
- Fixed some potential bugs found when trying to fix GCC compilation.
- Converted the documentation from ODT to DocBook. Because of that an on-line version of the documentation is available as well.
- Upgrade to SQLite version 188.8.131.52
Version 1.2.0 (8 January 2013)
- There was an inconsistency between the documentation and code about the name of the option to specify your custom path for the database. Use DBFile from now on. For backwards compatibility the DBPath entry will still be recognized.
- When a snippets creates a new document and the current document is empty, it reuses the current one and does not start a new.
- Added Duplicate snippet function to context menu.
- New (simple) templates library.
- Upgrade to SQLite version 184.108.40.206
Version 1.1.0 (2 January 2012)
- You can now add a new snippet to a library based upon the current selection or based upon the content of the clipboard. Right-click the snippets list to use these items.
- Installation has been improved. A template database is provided and when the plug-in tries to find an existing database and it can't find it, it copies this template database to the AppData plugin-config directory.
- The About dialog now shows the change-log.
- When you upgrade the very first time the change-log for the current version will be shown.
- When you didn't select a specific library for a certain language, the automatic selection of the library is improved. The first language specific library is preferred over the first general library.
- Resized the edit snippet dialog.
- Upgrade to SQLite version 3.7.9
- Moved the download to Google code. This gives me statistics about downloads and an issue tracker. The project's web page stays where it is.
Version 1.0.0 (6 September 2011)
- The selection or cursor position are now restored after inserting a snippet.
Version 0.7.1 (28 August 2011)
- Fixed a bug in the dialog to edit the languages for a certain library. This bug could cause a problem that libraries turn invisible, since all the records in LibraryLang table for that library were deleted and no new records were added.
Version 0.7.0 (1 August 2011)
- A user interface for editing the language selection for libraries has been added. You need at least Notepad++ version 5.93 for this feature.
- You can import a library from another NppSnippet database.
- Added an option DBPath to the ini-file to override the default location of the database. Made this mainly for my own testing, but maybe it is useful for others as well (corporate database). You need to manually edit the ini-file to use this.
- Added an icon to the tab of the docking interface.
- Upgrade to SQLite version 220.127.116.11
Version 0.6.0 (15 June 2011)
- It is now possible to add, edit or delete the snippets and the libraries from within Notepad++. It is not yet possible to edit the languages for a library.
- Added a new ANSI-characters library for all languages.
- Deleted the useless General library.
- Upgrade to SQLite version 18.104.22.168
Version 0.5.0 (21 December 2010)
- Upgrade to SQLite version 3.7.4
- The focus is returned to the Scintilla window at start-up and after inserting a snippet.
- The plug-in remembers if it is shown.
- Added another special language to the table LibraryLang: Lang = -2. Libraries with this language will always be shown for all languages.
- The languages last used used is now stored in a separate table. The database schema version is 3. With this the libraries with special languages (negative language ID's) can be remembered as last used as well.
- Error message when the database can not be opened.
- Source code now packed with 7-Zip.
Version 0.4.0 (8 April 2010)
The database schema is updated and is now at version 2. The most important difference is that the "language" and "last used" field of the library are now in a separate table, allowing it to be one-to-many. Existing databases will be converted automatically to the new schema.
- When there are multiple libraries for a language, changing to another library works and the last used library is remembered.
- The plug-in now first tries to find the database in the user's plug-in config directory. If the database can't be found there it looks in the plugin\config directory in the Notepad++ installation directory.
- Small improvements to the About dialog.
- There are now 4 HTML libraries, 1 PHP libraries, 1 XML library and 1 (rather useless) General library
Version 0.3.0 (10 February 2010)
- First alpha version, released under the GPL2 license.
- The basics work, no User Interface yet to edit the snippets.
Version 0.1.0 (22 January 2010)
- Proof of concept.