Sublime Text Editor OpenBOR TXT Syntax Definition

GamerGuy

New member
Here is a new sublime text openbor txt syntax definition file that will enable syntax highlighting for openbor project txt files.

Feel free to try it out and comment so it can be updated or even replaced by something else.

Download Here:

http://www.chronocrash.com/forum/index.php?action=downloads;sa=view;down=211

# OpenBOR-Text Sublime Text Definition v0.1
# this is a syntax definition file for .txt files used by the openbor game engine
# this file was created by GamerGuy chronocrash.com in the year 2021

# based on the source code and the legacy manual
# OpenBOR v3.0 Build 6391
# https://github.com/DCurrent/openbor/releases/tag/v6391
# https://github.com/DCurrent/openbor/blob/master/engine/source/openborscript/commands.c
# https://github.com/DCurrent/openbor/blob/master/engine/openbor.c
# http://www.chronocrash.com/apps/wiki/obor/index.php?title=OpenBOR_Legacy_Manual

# this supports:
# comments
# numbers (integers and floating point)
# +/- (negative numbers and dashed variables are both available)
# file path parameters (data/...)
# command names (case insensitive)

# sublime text documentation
# http://www.sublimetext.com/docs/3/syntax.html
# https://www.sublimetext.com/docs/3/scope_naming.html

Installation Instructions

I. Copy Syntax Definition File to User Packages:

C:/Users/Me/AppData/Roaming/Sublime Text 3/Packages

II. Invoke Syntax in Sublime Text:

View -> Syntax -> OpenBOR Txt
 
Welcome to the forum GamerGuy.

Very nice addition to the tool set!  :)

It's embarrassing to admit, but as long as I've done code work, I've never loaded a custom syntax definition before. This should be interesting. Super helpful once done though.

DC
 
Kratus said:
GamerGuy
Nice addition dude, thanks. Can it be loaded by the Visual Studio Code too?

You're welcome. Well... no, they don't use the same kinds of files. This would have to be ported basically.

They both support tmlanguage files, so that would have been a nice implementation bridge, but sublime text upgraded to sublime syntax files.
 
THanks buddy, but I am having a hard time installing it on Sublime for mac.
I've downloaded it and put on the packages folder you mentioned (I am on a mac), but when I go to the menu, I don't see OPENBOR on the list.
I am using version 3.2.2 build 3211
 
O Ilusionista said:
THanks buddy, but I am having a hard time installing it on Sublime for mac.
I've downloaded it and put on the packages folder you mentioned (I am on a mac), but when I go to the menu, I don't see OPENBOR on the list.
I am using version 3.2.2 build 3211

This was resolved by putting the file into the users folder inside the packages folder, which is where it would normally go, but it must be a requirement on mac.

C:/Users/Me/AppData/Roaming/Sublime Text 3/Packages/User

You might have to try this to view the syntax:

View -> Syntax -> User -> OpenBOR Txt
 
GamerGuy where were you a year ago when I was pulling my hair out trying to figure out how to make a custom syntax for sublime text.

After a bit of learning I figured out a bit of regular expression and made my own syntax its very helpful when your making openbor game especially using the auto fill option on scripting  ;D

 
Back
Top Bottom