1

I am wondering whether it is possible to create a plugin that would act as a kind of a word-preprocessor.

Here is an example to make things more clear:

Let's say I want to be able to highlight words or sentences. But I want to do this using a custom syntax, like <red>text</red>. I know this can be easily achieved with syntax definitions.

However, I am also searching for a way to hide the syntax part itself, aka. the <red> and </red> from the view. This would leave only red text visible within the editor.

So, when the file is loaded, the syntax is hidden and the words are highlighted. When file is saved, the syntax is saved as well.

Is this possible to achieve through a plugin? If so, which functions/methods should I look for?

2
  • 1
    No, this is not possible with Sublime. It is a text editor, meaning that it edits plain text files and shows their complete contents. You can edit markup, like HTML, XML, Markdown, etc., but it does not parse that markup and display the rendered version. There are plenty of other programs and IDEs that do that for you, though.
    – MattDMo
    Oct 25, 2016 at 16:56
  • Oh, didn't think about it that way.. Oct 25, 2016 at 17:17

0

You must log in to answer this question.

Browse other questions tagged .