OpenBVE Syntax highlighter for Notepad++
2 posters
Page 1 of 1
OpenBVE Syntax highlighter for Notepad++
Something OpenBVE developers currently lack is a decent syntax highlighter
There was one for ConTEXT a while back (I had it, but I've lost it!), and last night I was bored & decided to cook something up to fill this gap, and this is what came out of it:
The initial source is at the Google code link, I've only made some very small changes. Will post my source as soon as the code stabilises a bit
Will also add this to my site once it's stable.
Cheers
Chris Lees
http://www.bvecornwall.co.uk
There was one for ConTEXT a while back (I had it, but I've lost it!), and last night I was bored & decided to cook something up to fill this gap, and this is what came out of it:
OpenBVE Routefile Syntax Highlighter Plugin for Notepad++
---------------------------------------------------------
V1.1
----
* Properly compiled aginst Notepad++ v1.8 as a 'Unicode Release'.
* Now fixed to no longer be case sensitive.
General
-------
This was created by Christopher Lees (leezer3@bvecornwall.co.uk) &
based upon the GPL Gmod Lua Highlighter created by Kyle Fleming (aka Garthex)
This plugin will highlight most standard OpenBVE routefile syntax by default.
There are 6 keyword parser groups, which is the most this plugin will support properly. I've divided these into these categories:
* Primary Paramaters:
curve adhesion turn pitch fog brightness limit ground height
* Rails & Types:
rail railstart railend railtype
* Walls & Dikes:
wall wallend dike dikeend pole poleend crack
* Freeobjects & Sounds:
freeobj announce Announce
* Signalling & Markers:
sigf SigF section Section beacon marker Marker
* Stations & Platforms:
sta stop form forml formr
The default highlighter colors are stored in hex format in the second section of the OpenBVE.xml file.
You can easily add more commands & variations by editing the OpenBVE.xml file, or alternatively mail me and I'll
see what I can do
Keywords & colors can also be added/ edited by using the 'Settings\Style Configuratior' dialog.
Installation
------------
Open your 'Notepad++\Plugins' folder.
Before proceeding, please ensure that Gmod Lua is not currently installed (Delete GmodLua.dll & config\GmodLua.xml)
Place OpenBVE.dll & the Config folder inside your "Notepad++/plugins" folder.
Open Notepad++ & OpenBVE should now show up in your 'Language' menu.
Further Points
--------------
For more information on the Gmod Lua plugin, please visit:
Official SVN/Wiki hosting-
http://code.google.com/p/npp-gmod-lua/
Facepunch forum release thread-
http://forums.facepunchstudios.com/showthread.php?p=8625735
SourceForge.net download page-
https://sourceforge.net/project/showfiles.php?group_id=189927&package_id=265782
Special Thanks for borrowed code:
Thell Fowler
Robert Roessler
Paul Winwood
Alexey Yutkin
Marcos E. Wurzius
Philippe Lhoste
The initial source is at the Google code link, I've only made some very small changes. Will post my source as soon as the code stabilises a bit
Will also add this to my site once it's stable.
Cheers
Chris Lees
http://www.bvecornwall.co.uk
- Attachments
Re: OpenBVE Syntax highlighter for Notepad++
am i right in saying this only works with a certain type of code? im sure on openbve forum it came out that only track section or something could be used for it, and im not too sure what this actually is? what does all that jargon do?
mrknowitall- Posts : 824
Join date : 2011-07-09
Age : 31
Location : W. Yorkshire
Re: OpenBVE Syntax highlighter for Notepad++
mrknowitall wrote:am i right in saying this only works with a certain type of code? im sure on openbve forum it came out that only track section or something could be used for it, and im not too sure what this actually is? what does all that jargon do?
Not really
In essence, anything after the with Track, statement should be highlighted nicely.
At the moment, there's an issue in that if it finds a keyword elsewhere (Comments basically), this gets highlighted, as it doesn't recognise a period as a valid character for keywords.
Install the plugin and open any CSV route, and you'll see
Other than that it's reasonably complete.
Cheers
Chris Lees
http://www.bvecornwall.co.uk
Similar topics
» OpenBVE syntax highlighter for Notepad++ 7.9.1
» Wrong overspeed measurement, syntax error in in-app updater
» Camera angles in OpenBVE, possible future optimise options for OpenBVE?
» openBVE 1.4.5 + new openBVE mirror site
» openBVE 1.2 vs. openBVE 1.4 comparison
» Wrong overspeed measurement, syntax error in in-app updater
» Camera angles in OpenBVE, possible future optimise options for OpenBVE?
» openBVE 1.4.5 + new openBVE mirror site
» openBVE 1.2 vs. openBVE 1.4 comparison
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|