Install Odin language syntax highlighting support for use with the command line tool called bat created by @sharkdp
bat : A cat(1) clone with syntax highlighting and Git integration.
To provide an Odin language syntax highlighting support file, that works with bat.
Only the single file: Odin.sublime-syntax is required!
Download either by:
a) cloning this whole repo : git clone https://github.com/wiremoons/odin-syntax-for-bat.git
or
b) just download the single syntax support file directly to your computer with a tool such as curl or wget : curl -OL https://raw.githubusercontent.com/wiremoons/odin-syntax-for-bat/main/Odin.sublime-syntax
Once you have a copy of the Odin.sublime-syntax
file, use it with bat
as follows:
To install bat
use the distro package manager (ie sudo apt install bat
) or download it from: bat. Once installed, to add Odin language support:
- Save a copy of the
Odin.sublime-syntax
from this repo into the following directory:~/.config/bat/syntaxes/
- Run the following
bat
command:bat cache --build
- Check Odin is now included in the list when running:
bat --list-languages
Now when viewing an Odin language source code file, syntax highlighting should be supported.
To install bat
the popular macOS package manager HomeBrew can be used (ie brew install bat
) or download it from: bat. Once installed, to add Odin language support:
- Save a copy of the
Odin.sublime-syntax
from this repo into the following directory:~/.config/bat/syntaxes/
- Run the following
bat
command:bat cache --build
- Check Odin is now included in the list when running:
bat --list-languages
Now when viewing an Odin language source code file, syntax highlighting should be supported.
To install bat
on Windows, see the help here: bat. Once installed, to add Odin language support:
- With
bat.exe
installed run the command:bat --config-dir
. This location is thebat.exe
config directory location. - Change to the
bat.exe
config directory (as above) and make a new directory called:syntaxes
. - Save a copy of the
Odin.sublime-syntax
from this repo into the newly createdsyntaxes
directory. - Run the following
bat.exe
command:bat.exe cache --build
- Check Odin is now included in the list when running:
bat --list-languages
Just for clarity - on my Windows 10 computer with a username of simon the full path of the
required syntaxes
directory is: C:\Users\simon\AppData\Roaming\bat\syntaxes\
and this is
where the a copy of the Odin.sublime-syntax
file from this repo should be saved. The
username (ie simon
) will be diffrent of course for your computer! Then run the
command: bat cache --build
to complete the process.
Now when viewing an Odin language source code file, syntax highlighting should be supported.
More complete instructions on using and adding a new syntax files with bat
are
included in the Bat Readme document.
The Odin.sublime-syntax
file was created by @gingerBill and is made availble from his repo here: sublime-odin
As well as being kind enough to create this syntax highlighting file, @gingerBill then went on and made a whole language and complier to go with!! Be sure to visit the Odin GitHub repository and give it a ⭐️ and then learn more about Odin and "enjoy programming again".
The files are provided under the MIT open source license. A copy of the MIT license file is here.
The files in the repository are licensed under the MIT License that also respects the original licences used in @gingerBill's repo that when last checked is MIT as well.