Cron / Crontab syntax highlighting for Sublime Text 2 and 3
- Total 2K
- Win 382
- OS X 802
- Linux 454
|Mar 19||Mar 18||Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7||Mar 6||Mar 5||Mar 4||Mar 3||Mar 2||Mar 1||Feb 28||Feb 27||Feb 26||Feb 25||Feb 24||Feb 23||Feb 22||Feb 21||Feb 20||Feb 19||Feb 18||Feb 17||Feb 16||Feb 15||Feb 14||Feb 13||Feb 12||Feb 11||Feb 10||Feb 9||Feb 8||Feb 7||Feb 6||Feb 5||Feb 4||Feb 3||Feb 2|
Crontab Syntax Highlighting
- Open Sublime Text 2/3
- Locate Preferences in the menu, click on “Browse Packages…”
- Create a folder named Crontab and copy everything from this repository in that folder
A recent addition was using a few different sytax types like
in the language definition syntax. This is a bit of a hack because Sublime Text does not
seem to have an easy way for a plugin to suggest colors for the language scopes. In
addition, it is hard to know what scopes will be available in a theme, so with most
meta.minute.crontab will show up the same. This led me to believe
the plugin was 'broken' when it was first installed because everything was one color.
The syntax will look acceptable with most themes with these revised scopes:
keyword.at.crontab keyword.minute.crontab constant.hour.crontab class.dayofmonth.crontab keyword.month.crontab constant.dayofweek.crontab string.command.crontab
This will at least give it some syntax coloring with most themes - but still allow themes to override the colors.
If you would like to make the colors look more like the
vim darkbg style,
add the definitions from the included
optional-add-to-theme.xml file to your theme, or
perhaps use the Sublime Theme Editor to customize.