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
  • 4 years ago
  • 2 hours ago
  • 4 years ago

Installs

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