Sublime Forum

.wiki as a file type

#1

I want to use sublime to edit pages in my wikidpad, i would love it if it would recognize the wiki syntax and highlight the text! So, Is there an easy way to add a .wiki file type? What needs to be done to add support for additional file types?

0 Likes

#2

There’s really no easy way of doing a custom syntax file in sublime. Basically is really the same as doing it for textmate but with some changes.
The correct name for “custom syntax or file type” is “Language grammars” manual.macromates.com/en/language_grammars.html

in sublime you gotta build the grammar file in XML instead of how textmate does it. Is more cumbersome but oh well. After creating the grammar you need to edit your theme and start coloring your syntax based on the scopes you define.

If I’m not too lazy in the future I might write a tutorial on how to do it. Not that hard once you get the hang of it. :smile:

0 Likes

Customize syntax highlighting?
#3

Thank you for your response. :smile: I will watch for your tutorial.

0 Likes

#4

I might even pick wikipad syntax as a guinea pig :smiley:

0 Likes

#5

If you want to use similar fuzzy matching in plugins without feeding it through the quick panel or writing your own algorithm, you can try using difflib.

0 Likes