Programmer's Notepad 2.1.4 Released

A new testing release, Programmer’s Notepad 2.1.4 has been released to Google Code. This release fixes a bunch of bugs, and big improvements to the text clips syntax. This does unfortunately mean a slight break with the syntax released in 2.1.2, but for good reasons. The updated syntax is now far closer to that supported by TextMate, meaning it’s easy to use most of the simpler TextMate Snippets in Programmer’s Notepad. Future releases will add support for more TextMate Snippet features. The lack of a bash shell means that many Snippets will not translate 1:1, but I aim to support at least Python scripting which will allow most Snippets to be converted with feature parity.

There is new documentation for the updated text clips syntax on the documentation site: Text Clips. To upgrade your clips you can probably simply replace all instances of $(…) with ${…}.

Changes in 2.1.4:

  1. Replaced the text clip parser with a brand new one, supporting placeholders and variables

  2. Allow text clip insertion using tab.

  3. Update tagging to use CTags 5.8, add support for new ctags languages, including batch, matlab, ocaml, …

  4. Custom scheme (schemedef improvements) including case sensitive option and various fixes and optimisations - thanks to Lennard Fonteijn

  5. Autocomplete fixes, better support for mixed tag and keyword autocomplete, again thanks to Lennard

  6. Updated Scintilla to version 2.11

  7. Distributed clips updated for new syntax

Fixes:

  1. Remove magic folder if add cancelled (#868)

  2. Fix overlapping UI element (#869)

  3. Fix error when enter pressed in command bar and no text present (#842)

  4. Fix annoying issue where keyboard cannot access menus from docking windows

  5. Remove system menu and min/max from docking windows (#776)

  6. Stability fixes for update check, fixes case where we fail to even open the wininet connection (#765)

  7. Correctly display status of File save modifiers (#836)

  8. Fix magic folder path changing. (#760)

  9. Default to UTF-8 file type if UTF-8 is our default code page (#821)

  10. Make sure modified state is retained when splitting view (#841)

  11. Fix incorrect matching with calltips (#792)

  12. Fix default style continuation thanks to Lennardfonteijn (#890)

  13. Don’t ignore case when matching MRU combo entries (#690)

  14. Change clashing keyboard shorcut, fixing paragraph navigation (#831)

  15. Remove length limit on quick find box (#832)

  16. Fix crash when clearing font size box (#870)

  17. Make sure we don’t try to cache too much from a single ctags line (#901)

  18. Support overwriting hidden files (#859)

  19. Make sure scheme command line argument is passed through intact (#899)

  20. Correctly remove autocomplete handlers when autocomplete aborted (#857)

  21. Fixed scrollbar being set to a width on an empty document (experimental, #897)

  22. Fix text clip completion list

  23. Various custom lexer fixes (#37 and others)

  24. Fixed Autocomplete not coming up untill before you saved a file

  25. Avoid reading zip file subfolders attribute, speed up loading

Downloads: Download 2.1.4 Installer Download 2.1.4 Portable Download 2.1.4 Multi-Language

Thanks to all contributors, translators and testers for their help with this release.

Programmer's Notepad 2.1.3 Released

A new testing release, version 2.1.3 of Programmer’s Notepad has been released to Google Code. This release fixes a bunch of bugs, but more importantly contains a complete rewrite of the Text Clips UI and Management/Editing features.

Changes in 2.1.3:

  1. Complete re-write of text clips view and clips management system

  2. End clip entry on final empty field (experimental)

  3. Smart highlight range now limited to field of view +/- 200 lines, improves speed and usability with large files.

  4. Translations now fed directly from user translation project at pnotepad-trans.googlecode.com

  5. Switch to boost 1.42

Bug Fixes:

  1. Fix magic folder path changing. Fixes bug #760.

  2. Default to UTF-8 file type if UTF-8 is our default code page. Fixes bug #821.

  3. Fix incorrect behaviour when cancelling project load. Fixes issue #797.

  4. Don’t ignore the first item when searching in Jump dialog. Fixes issue #820.

  5. Project template bugs introduced in 2.1

  6. Use correct foreground color for options section header. Fixes issue #814.

  7. Fix taggers path. Add .pyw to default ctags options.

  8. Reset chunk position at start of clip insertion. Fixes issue #805.

  9. Fix GetLongPathName call. Fixes issue #803.

  10. Don’t lowercase filename on adding new file. Fixes issue #527.

Downloads

Download 2.1.3 Installer Download 2.1.3 Portable Download 2.1.3 Multi-Language

Text Clips Changes

There has been confusion ever since the Code Templates feature was originally introduced over which to use, Templates or Clips – each feature had useful aspects and the separation between them was a design mistake. As of the 2.1.3 release all Code Templates features have been merged into Text Clips, and Text Clips has been re-designed to present a more understandable and usable feature - completely revamped User Interface, improved management of Clips files, editing built-in.

Screenshot of New Clips Editor

Built-in Editing

You can now Add/Remove/Edit Text Clips using the new 2.1 smart templates syntax directly from the Text Clips window. Text Clips are organised primarily by the scheme they are relevant to, and then optionally by sub-groups. In the screenshot you can see the main Python clips are shown at the top of the view, and then sub-sections for PyPN and Django are visible and expanded. You can add and remove sections in the Text Clips window.

You can always browse clips associated with any scheme, but keyboard shortcuts are limited to the currently selected scheme.

Storage Changes

All the issues with discovery of .clips files should be resolved, and yet we retain great support for user editing of clips (including for non-admin users). Clips files are now organised by scheme, and any changed set of clips is stored in the user settings directory so that settings are kept user-centric and we don’t need to modify installed files.

Out with the Old, In with the New

This change means that support for the old simple Text Clip syntax has been removed in 2.1.3, and many of the clips files will need updating and could do with new relevant clips creating. All submissions welcome!

Programmer's Notepad 2.1.2 Released

A new testing release, version 2.1.2 of Programmer’s Notepad has been released to Google Code. The major new feature in this release is Code Template Fields, but there have been a lot of other changes too:

  • Code Template Fields

  • Cleaner visual style for the document tabs

  • Added line padding options, allows more whitespace between lines

  • Switch to Scintilla’s built-in line length measurement

  • Removed some 3D styling bits to clean up the look of the editor, more to do.

  • New tab text changed from to Untitled

  • -z parameter now assumes a single file after the -z, designed for notepad replacement.

  • Updated to latest Scintilla bits for some multi-caret fixes

  • Fixed a couple of regular expression issues.

  • Fix tools options tab titles.

  • Made SmartHighlight more visible, less alpha blending

In case you haven’t used a 2.1 build yet, here are the other headline features in the testing builds:

  1. Full Unicode Support

  2. Support for Translations - PN in your language

  3. Prototype Command Bar feature (with PyPN)

  4. Multiple simultaneous selections, including typing into block selections

  5. Virtual space

Downloads:

Download 2.1.2 Installer Download 2.1.2 Multi-language Installer Download 2.1.2 Portable

Updated Portable download link now, apologies for the confusion!

Introducing Template Fields

The next Programmer’s Notepad testing release (2.1.2) adds support for Template Fields. This is the first new feature in a series of improvements to Code Templates/Text Clips which I’ll talk about more in a future post.

Template Fields are the first part of the work necessary to support TextMate Snippet-style features. The best way to show you what’s supported so far is with a quick screencast:

Here are the standard snippet features that are not supported (yet):

  • Regular Expression Modifiers

  • Environment Variables / Contextual values, e.g. Current File Name

  • Inclusion of output from external tools / scripts

These will all be delivered in future releases. I’ve included some sample clips for PHP with the 2.1.2 distribution, but due to a bug with the way new clips are detected you’ll need to delete your InstallClipCache.xml file to force an update - this will be fixed for the next release. You can find the InstallClipCache.xml file in your User Settings directory (e.g. c:\users\myuser\AppData\Roaming\Echo Software\PN2).

Adding new clips is easy, just go to Code Templates in the Options dialog and add templates to the relevant scheme. You insert template fields with this notation:

$(1:Text User Will Replace)

The number is used to link different fields together, the first instance of each one is the “master” field for that number. The number 0 is special and will cause the cursor to be positioned there at the end of clip insertion, e.g.:

while ($(1:Condition)) { $(0) }

Clips you add yourself in options will be available straight away in the editor, just type the shortcut (or part of it) and press Ctrl-Alt-Space. In the future pressing Tab will expand templates where the name is matched.

I hope you enjoy trying out this new feature, a lot of work went into making it!