Sublime Forum

Add string to match single quote to text files

#1

I would like to make single quotes to show as string in text files. I added next to
Packages\Text.sublime-package\Plain text.sublime-syntax
but it does not work. Any ideas?

  strings:
    - match: "'"
      scope: punctuation.definition.string.begin.plain
      push:
        - meta_include_prototype: false
        - meta_scope: string.quoted.single.plain
        - match: "''"
          scope: constant.character.escape.plain
        - match: "'"
          scope: punctuation.definition.string.end.plain
          pop: true
        - include: string-escape
0 Likes

#2

Packages are represented by

  • Installed Packages\Text.sublime-package (zip archives)
  • Packages\Text\ (folders)

Folders in Packages directory doen’t need an file extension (.sublime-package).

Just place your syntax to Packages\Text\Plain Text.sublime-syntax

1 Like

#3

Not sure why it works now. But not if I create the file in:
Packages\Text\Plain text.sublime-syntax

It works if I put same file in:
Packages\Text.sublime-package\Plain text.sublime-syntax

Thank you.

0 Likes

#4

Doesn’t make sense.

2 Likes