Cron / Crontab syntax highlighting for Sublime Text 2 and 3
- Total 2K
- Win 521
- OS X 1K
- Linux 554
|Aug 23||Aug 22||Aug 21||Aug 20||Aug 19||Aug 18||Aug 17||Aug 16||Aug 15||Aug 14||Aug 13||Aug 12||Aug 11||Aug 10||Aug 9||Aug 8||Aug 7||Aug 6||Aug 5||Aug 4||Aug 3||Aug 2||Aug 1||Jul 31||Jul 30||Jul 29||Jul 28||Jul 27||Jul 26||Jul 25||Jul 24||Jul 23||Jul 22||Jul 21||Jul 20||Jul 19||Jul 18||Jul 17||Jul 16||Jul 15||Jul 14||Jul 13||Jul 12||Jul 11||Jul 10||Jul 9|
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.