HowTo/Add a config.txt syntax highlighter to Notepad++

From TrainzOnline
< HowTo(Difference between revisions)
Jump to: navigation, search
(Initial release)
 
m (Fixed GitHub link)
 
Line 7: Line 7:
  
 
==Where do I get it?==
 
==Where do I get it?==
You can find the tool {{plain link|https://github.com/gusztavj/Trainz-Config-for-NotepadPlusPlus/releases/tag/1.0.0.|here}}.  The tool was developed by Gusztavj and has been made available for public use.  Many thanks to Gus for his work.
+
You can find the tool {{plain link|https://github.com/gusztavj/Trainz-Config-for-NotepadPlusPlus|Here}}.  The tool was developed by Gusztavj and has been made available for public use.  Many thanks to Gus for his work.
  
 
==Installation==
 
==Installation==

Latest revision as of 19:47, 31 May 2021

Contents

[edit] Config.txt Syntax Highlighter for Notepad++

[edit] Notepad++

Notepad++ is a free text editor suitable for editing plain text file such as those used for a config.txt file and TrainzScript (.GS) files. You can obtain a copy of Notepad++ at the NotePad++ website,

This page describes how to install a syntax hightlighting tool (addon) in Notepad++ so that keywords such as "kind", "mesh-table", and "kuid" are shown as coloured text in the editor. The tool also provides support for indenting of containers such as a mesh-table and the collapsing of containers to facilitate reading.

[edit] Where do I get it?

You can find the tool Here. The tool was developed by Gusztavj and has been made available for public use. Many thanks to Gus for his work.

[edit] Installation

1. Download and install Notepad++ if not already installed.
2. From the addon link above download the file Trainz.Config.Syntax.xml.
3. Start Notepad++ and, from the main menu, select Language->User Defined Language->Open User Defined Language Folder as shown below.

Installing-for-npp.png

4. Drag and drop the Trainz.Config.Syntax.xml file into this folder. Note that this folder is in your user (apps) folder and not the Notepad++ installation folder.
5. Restart Notepad++.
6. Return to the main menu item Language and check the "Trainz Config.txt Files" if not already checked.

[edit] A Sample Config

In this image you can see a partial config.txt for a steam loco with several entries in the mesh-table and a couple collapsed for readability.

Sample-view.png

[edit] See Also

callavsg's Scripting Tools

<< How To Guides

Personal tools