ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Crontab Syntax

by clarkewd ST2/ST3

Cron / Crontab syntax highlighting for Sublime Text 2 and 3

Details

  • 1.0.0
  • github.​com
  • 3 years ago
  • 53 minutes ago
  • 3 years ago

Installs

  • Total 1K
  • Win 344
  • OS X 715
  • Linux 392
Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6
Windows 1 0 3 0 1 2 1 0 0 1 1 1 1 0 0 0 1 0 1 0 1 2 0 1 3 1 0 0 0 0 2 0 1 1 0 1 0 0 1 0 0 0 1 0 0 0
OS X 0 1 1 0 5 1 5 0 0 0 3 1 1 1 0 2 0 1 2 0 1 1 1 3 1 4 0 0 1 0 0 5 2 1 1 0 2 1 2 1 0 1 0 0 0 1
Linux 0 0 1 3 2 0 0 0 1 1 1 0 2 1 0 1 0 1 0 0 0 0 3 0 1 0 1 1 0 0 0 0 1 2 0 0 0 0 0 1 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Crontab Syntax Highlighting

Installation

  1. Open Sublime Text 2/3
  2. Locate Preferences in the menu, click on “Browse Packages…”
  3. Create a folder named Crontab and copy everything from this repository in that folder
  4. Enjoy

Optional

A recent addition was using a few different sytax types like constant and keyword 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.hour.crontab and 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.

vim dark

Credits

WheresWardy kevinior