A Sublime Text 3 package that adds a simple syntax highlighting, perfect for config files. mirror of https://github.com/budlabs/SimpleSyntax
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
budRich 66bebcab82 update há 2 anos
DquoteComments.tmPreferences update há 2 anos
DslashComments.tmPreferences first commit há 2 anos
ExclaComments.tmPreferences first commit há 2 anos
HashComments.tmPreferences first commit há 2 anos
LICENSE first commit há 2 anos
README.md Add config for package control installation há 2 anos
SemiComments.tmPreferences first commit há 2 anos
messages.json first commit há 2 anos
ssDquote.sublime-syntax update há 2 anos
ssDquote.tmLanguage update há 2 anos
ssDquote.tmPreferences update há 2 anos
ssDslash.sublime-syntax first commit há 2 anos
ssDslash.tmLanguage added tmLanguage files há 2 anos
ssDslashsymbols.tmPreferences xml fix2 há 2 anos
ssExcla.sublime-syntax first commit há 2 anos
ssExcla.tmLanguage added tmLanguage files há 2 anos
ssExclasymbols.tmPreferences xml fix2 há 2 anos
ssHash.sublime-syntax first commit há 2 anos
ssHash.tmLanguage added tmLanguage files há 2 anos
ssHashsymbols.tmPreferences xml fix2 há 2 anos
ssSemi.sublime-syntax first commit há 2 anos
ssSemi.tmLanguage added tmLanguage files há 2 anos
ssSemisymbols.tmPreferences xml fix2 há 2 anos

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