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
  • 14 minutes ago
  • 3 years ago

Installs

  • Total 2K
  • Win 358
  • OS X 752
  • Linux 414
Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30
Windows 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 2 0 1 0 1 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0 0 0 1 1
OS X 1 0 1 0 0 0 0 1 1 0 1 0 0 1 1 1 2 1 0 2 0 1 2 0 0 0 1 2 1 0 1 0 0 0 2 2 2 0 1 0 1 1 0 2 0 1
Linux 0 0 0 0 0 0 0 1 0 0 2 0 0 0 0 0 2 0 1 0 0 0 0 1 0 0 2 1 2 0 1 0 0 1 1 0 1 0 3 0 0 0 1 3 1 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