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

From TrainzOnline
< HowTo
Revision as of 19:47, 31 May 2021 by Christopher824 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Config.txt Syntax Highlighter for Notepad++

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.

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.

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.

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

See Also

callavsg's Scripting Tools

<< How To Guides

Personal tools