Syntax highlighting of Celestia Catalogs in Notepad++
Posted: 12.01.2012, 22:18
For a long time now NOTEPAD++ has been my editor of choice when working with Celestia catalog files (or other files) because, well to put it simply, it's just a great editor. Simple to use, yet powerful and extensible.
Celestia's catalog language is NOT included in the long list of common languages recognized automatically by NOTEPAD++, HOWEVER, like any good editor, NOTEPAD++ can be extended to recognize custom languages by creating a "user-defined language".
I've been meaning to do this for ages, and finally made a start on this last night.
So, if you use NOTEPAD++, you're tired of this plain look :
and you'd rather see something more helpful like this:
... then you might find this tool useful.
VERSION 5 DOWNLOAD:
(added CELX script handler as requested.)
INSTALLATION:
Find the existing userDefineLang.XML file in your installation.
in XP: "...\Documents and Settings\...[User]...l\Application Data\Notepad++"
in Win7: "%APPDATA%\Notepad++"
If you haven't already made any other user defined languages for NOTEPAD++, then you can simply replace the existing (empty) XML file with this one. (Take a backup if you're not sure).
WARNING: If you do have other user defined languages, then you'll need to cut and paste from this one into the existing one, rather than just replacing it.
Now open any Celestia ssc, ctx, stc, dsc, dat, cfg, or celx file and you should see the syntax highlighted automatically.
If not, you can select the language manually from the Language menu.
-- Down the bottom...
CelSSC (for ssc, ctx, dat, or cfg files),
CelSTC (for stc, dsc),
CelX (for celx).
Hope someone finds this useful. Any feedback welcome.
(Please let me know of any omissions.)
I have done nothing for CELX files as they are probably reasonably well serviced by the LUA language syntax already provided with NOTEPAD++. However it might be worth adding specific celX keywords in the future (ie. the non LUA elements)
UPDATE:VERSION 5 now adds this functionality.
CC
Celestia's catalog language is NOT included in the long list of common languages recognized automatically by NOTEPAD++, HOWEVER, like any good editor, NOTEPAD++ can be extended to recognize custom languages by creating a "user-defined language".
I've been meaning to do this for ages, and finally made a start on this last night.
So, if you use NOTEPAD++, you're tired of this plain look :
and you'd rather see something more helpful like this:
... then you might find this tool useful.
VERSION 5 DOWNLOAD:
(added CELX script handler as requested.)
INSTALLATION:
Find the existing userDefineLang.XML file in your installation.
in XP: "...\Documents and Settings\...[User]...l\Application Data\Notepad++"
in Win7: "%APPDATA%\Notepad++"
If you haven't already made any other user defined languages for NOTEPAD++, then you can simply replace the existing (empty) XML file with this one. (Take a backup if you're not sure).
WARNING: If you do have other user defined languages, then you'll need to cut and paste from this one into the existing one, rather than just replacing it.
Now open any Celestia ssc, ctx, stc, dsc, dat, cfg, or celx file and you should see the syntax highlighted automatically.
If not, you can select the language manually from the Language menu.
-- Down the bottom...
CelSSC (for ssc, ctx, dat, or cfg files),
CelSTC (for stc, dsc),
CelX (for celx).
Hope someone finds this useful. Any feedback welcome.
(Please let me know of any omissions.)
I have done nothing for CELX files as they are probably reasonably well serviced by the LUA language syntax already provided with NOTEPAD++. However it might be worth adding specific celX keywords in the future (ie. the non LUA elements)
UPDATE:VERSION 5 now adds this functionality.
CC