A Sublime Text 3 package that adds a simple syntax highlighting, perfect for config files. mirror of https://github.com/budlabs/SimpleSyntax
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
budRich 66bebcab82 update 2 yıl önce
DquoteComments.tmPreferences update 2 yıl önce
DslashComments.tmPreferences first commit 2 yıl önce
ExclaComments.tmPreferences first commit 2 yıl önce
HashComments.tmPreferences first commit 2 yıl önce
LICENSE first commit 2 yıl önce
README.md Add config for package control installation 2 yıl önce
SemiComments.tmPreferences first commit 2 yıl önce
messages.json first commit 2 yıl önce
ssDquote.sublime-syntax update 2 yıl önce
ssDquote.tmLanguage update 2 yıl önce
ssDquote.tmPreferences update 2 yıl önce
ssDslash.sublime-syntax first commit 2 yıl önce
ssDslash.tmLanguage added tmLanguage files 2 yıl önce
ssDslashsymbols.tmPreferences xml fix2 2 yıl önce
ssExcla.sublime-syntax first commit 2 yıl önce
ssExcla.tmLanguage added tmLanguage files 2 yıl önce
ssExclasymbols.tmPreferences xml fix2 2 yıl önce
ssHash.sublime-syntax first commit 2 yıl önce
ssHash.tmLanguage added tmLanguage files 2 yıl önce
ssHashsymbols.tmPreferences xml fix2 2 yıl önce
ssSemi.sublime-syntax first commit 2 yıl önce
ssSemi.tmLanguage added tmLanguage files 2 yıl önce
ssSemisymbols.tmPreferences xml fix2 2 yıl önce

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