Does anyone know if you can use (or convert) vim Syntax Highlight Definition Files with Sublime Text?
I am searching for a highlighter for promela and only found one for vim, but am using sublime-text as my default editor
The Definition i've found https://github.com/vim-scripts/promela.vim/blob/master/syntax/promela.vim
To enable Syntax Highlighting click on “View” in the top bar, then hover your mouse over “Syntax”, and select your programming language from the list. Alternatively, if you save a document with a supported file extension, Sublime Text 3 will automatically apply the Syntax Highlighting for that language.
After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.
The colors of the syntax highlighting depend on Sublime Text's color theme. You can change the theme by going to Preferences > Color Scheme.
Go to Tools | Packages | Package Development | New Syntax Definition. Save the new file in your Packages/User folder as a . YAML-tmLanguage file.
Sublime Text uses the XML-based PLIST .tmLanguage
format for language definitions, and to my knowledge no one has written a converter for vim syntaxes. However, if you'd like to take a stab at creating one yourself, I'd recommend installing the PackageDev
plugin for ST2 (it doesn't really work on ST3 yet). It allows you to define syntaxes using YAML, which is much easier to work with than XML, and the regexes are in Onigurama format. You can then use the YAML to PLIST converter to translate everything into a .tmLanguage
format that Sublime will understand.
EDIT
PackageDev recently released a new version with full compatibility for ST3. It is available via Package Control.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With