Hi everyone! I’ve quietly been using Sublime Text for a while now (10+ years?) but recently started using it for something new (to me). As a lightweight, blazing fast e-reader!
I’m working on a custom syntax to facilitate custom text styling for this type of long-form reading and having an issue with curly brackets causing unwanted line wrapping within Chinese text (Chinese text does not contain any spaces between words/characters):
Here is my super simple, baby’s first sublime-syntax
file so far:
%YAML 1.2
---
file_extensions:
- read
scope: text
contexts:
main:
- match: '\{(.*?)\}'
scope: string
I’ve observed that commenting out the match
and scope
lines achieves this result:
This is perfect except that I’d like to have the text within curly brackets be highlighted green (or whatever color) for improved visual grepping. The other purpose of the brackets is to mark vocab words so that I can post-process the text to auto-generate Anki vocab flashcards with textual context.
Is there any way to have the text within brackets highlighted some color without also causing a line wrap?
Thanks in advance for any tips anyone might be able to provide! I’m looking all over Google and the Sublime Text documentation/forums for solutions and am getting the feeling that I’m not quite using the right words to describe the situation.
I Sublime Text! It literally single-handedly ignited my love for software.
Edit: This topic is similar, but I’m having a hard time understanding it because there’s so much going on.