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