A Sublime Text 3 package that adds a simple syntax highlighting, perfect for config files. mirror of https://github.com/budlabs/SimpleSyntax
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
budRich 66bebcab82 update pirms 2 gadiem
DquoteComments.tmPreferences update pirms 2 gadiem
DslashComments.tmPreferences first commit pirms 2 gadiem
ExclaComments.tmPreferences first commit pirms 2 gadiem
HashComments.tmPreferences first commit pirms 2 gadiem
LICENSE first commit pirms 2 gadiem
README.md Add config for package control installation pirms 2 gadiem
SemiComments.tmPreferences first commit pirms 2 gadiem
messages.json first commit pirms 2 gadiem
ssDquote.sublime-syntax update pirms 2 gadiem
ssDquote.tmLanguage update pirms 2 gadiem
ssDquote.tmPreferences update pirms 2 gadiem
ssDslash.sublime-syntax first commit pirms 2 gadiem
ssDslash.tmLanguage added tmLanguage files pirms 2 gadiem
ssDslashsymbols.tmPreferences xml fix2 pirms 2 gadiem
ssExcla.sublime-syntax first commit pirms 2 gadiem
ssExcla.tmLanguage added tmLanguage files pirms 2 gadiem
ssExclasymbols.tmPreferences xml fix2 pirms 2 gadiem
ssHash.sublime-syntax first commit pirms 2 gadiem
ssHash.tmLanguage added tmLanguage files pirms 2 gadiem
ssHashsymbols.tmPreferences xml fix2 pirms 2 gadiem
ssSemi.sublime-syntax first commit pirms 2 gadiem
ssSemi.tmLanguage added tmLanguage files pirms 2 gadiem
ssSemisymbols.tmPreferences xml fix2 pirms 2 gadiem

README.md

SimpleSyntax

This Sublime Text 3 package contains 4 simple syntax files. They only highlight and enable comments and is intended for use with configuration files.

Symbols

Another feature of SimpleSyntax is the possibility to add symbols/sections in your file. This is done by creating a comment where the first three characters are >> followed by an optional string. Then you can use Sublime Text’s built in function to goto symbol (default keybinding is: ctrl+r).

Enabling the syntax

It is up to the user to enable the syntax, since many config files have the same name, but might have different comment types it is hard to do this by filename. Personally i use the package, ApplySyntax with the following preferences:

If installed manually:

"syntaxes": 
[
  {
    "syntax": "ssSemi/ssSemi",
    "rules": [{"contains": "syntax:ssSemi"} ]
  },
  {
    "syntax": "ssExcla/ssExcla",
    "rules": [{"contains": "syntax:ssExcla"} ]
  },
  {
    "syntax": "ssHash/ssHash",
    "rules": [{"contains": "syntax:ssHash"} ]
  },
  {
    "syntax": "ssDslash/ssDslash",
    "rules": [{"contains": "syntax:ssDslash"} ]
  }
]

If installed through package control:

"syntaxes": 
[
  {
    "syntax": "SimpleSyntax/ssSemi",
    "rules": [{"contains": "syntax:ssSemi"} ]
  },
  {
    "syntax": "SimpleSyntax/ssExcla",
    "rules": [{"contains": "syntax:ssExcla"} ]
  },
  {
    "syntax": "SimpleSyntax/ssHash",
    "rules": [{"contains": "syntax:ssHash"} ]
  },
  {
    "syntax": "SimpleSyntax/ssDslash",
    "rules": [{"contains": "syntax:ssDslash"} ]
  }
]

And a comment in the settings file that look something like this:
# syntax:ssHash

License

MIT License