A Sublime Text 3 package that adds a simple syntax highlighting, perfect for config files. mirror of https://github.com/budlabs/SimpleSyntax
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
budRich 66bebcab82 update vor 2 Jahren
DquoteComments.tmPreferences update vor 2 Jahren
DslashComments.tmPreferences first commit vor 2 Jahren
ExclaComments.tmPreferences first commit vor 2 Jahren
HashComments.tmPreferences first commit vor 2 Jahren
LICENSE first commit vor 2 Jahren
README.md Add config for package control installation vor 2 Jahren
SemiComments.tmPreferences first commit vor 2 Jahren
messages.json first commit vor 2 Jahren
ssDquote.sublime-syntax update vor 2 Jahren
ssDquote.tmLanguage update vor 2 Jahren
ssDquote.tmPreferences update vor 2 Jahren
ssDslash.sublime-syntax first commit vor 2 Jahren
ssDslash.tmLanguage added tmLanguage files vor 2 Jahren
ssDslashsymbols.tmPreferences xml fix2 vor 2 Jahren
ssExcla.sublime-syntax first commit vor 2 Jahren
ssExcla.tmLanguage added tmLanguage files vor 2 Jahren
ssExclasymbols.tmPreferences xml fix2 vor 2 Jahren
ssHash.sublime-syntax first commit vor 2 Jahren
ssHash.tmLanguage added tmLanguage files vor 2 Jahren
ssHashsymbols.tmPreferences xml fix2 vor 2 Jahren
ssSemi.sublime-syntax first commit vor 2 Jahren
ssSemi.tmLanguage added tmLanguage files vor 2 Jahren
ssSemisymbols.tmPreferences xml fix2 vor 2 Jahren

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