This release of the GEDCOM plugin for Notepad++ adds two new features. First, the plugin now preserves your style customizations when updating, and second, something called a "langID" is displayed in the About dialog. (It is needed for Notepad++'s Function List.) In this post, I'll discuss the first one.
When first installed, the plugin styles the text of a GEDCOM file using the default global style font (for my system it is Courier New, size 10, black on white) and adds the following style adjustments for each grammar element:
|LEVEL||italic, green on white|
|TAG||bold, navy blue on white|
|ID||brown on white|
|POINTER||underlined, orange on white|
|INVALID||red on white|
|VALUE||medium grey on white|
|ESCAPE||deep sky blue on white|
|USER TAG||bold, magenta on white|
All of this styling information comes from the GedcomLexer.xml file that was initially installed.
Notepad++ has a great Style Configurator dialog which is reached from the main "Settings" menu with the "Style Configurator..." command. Using this tool, you can tweak the appearance of the elements for each language type. If you select the GEDCOM language, the Style column lists all of the grammar elements: LEVEL, TAG, ID, POINTER, etc. The panel on the right allows you to set foreground and background color as well as font attributes for each selected grammar element.
Each time you save and close this dialog, Notepad++ writes your changes to GedcomLexer.xml.
When an update is done "manually" by downloading a zip and extracting the files, or by using Notepad++'s plugin manager, the old GedcomLexer.dll and GedcomLexer.xml files are overwritten with the new ones. In anticipation of this, v0.1 of the plugin, already created a backup of the configuration each time Notepad++ is closed. This backup file is called GedcomLexer.last and is kept in the same directory as GedcomLexer.xml.
So starting in v0.2, styles are preserved during an update by copying the style information from the backup file GedcomLexer.last to the new GedcomLexer.xml. This copy is not performed every time the plugin is started, it is only done when the version of the new GedcomLexer.xml is different than the version of GedcomLexer.last. The version is an attribute in the header of these configuration files, that is incremented with each release.