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
  • 1 hour ago
  • 3 years ago

Installs

  • 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
Windows 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 0 1 2 0 0 0 0 0 0 1 1 0 0 0 0 0 0 2
OS X 1 0 1 2 1 0 0 2 2 3 0 0 0 1 0 0 1 1 4 1 0 0 1 1 1 4 2 1 0 2 1 1 1 1 0 0 0 1 2 0 0 0 0 1 1 1
Linux 1 0 1 0 0 1 1 2 1 0 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 3 1 1 0 0 1 2 1 0 0 0 0 1 0 1

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