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

web​Agent

by seanfagan ALL

Sublime syntax highlighting for webAgent

Details

Installs

  • Total 9
  • Win 4
  • Mac 3
  • Linux 2
Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

webAgent Syntax

Syntax highlighting for the “webAgent” language in Sublime Text.

Screenshot of webAgent syntax

Installation

You can install this package from Package Control (recommended) or manually. Package Control will automatically keep the package up-to-date. Manual installation is required if you want to edit the code or contribute.

Install via Package Control

  1. Install Sublime Package Control.
  2. In Sublime Text, open the Package Control command palette by pressing ctrl+shift+p (Win, Linux) or cmd+shift+p (Mac).
  3. Type “Package Control: Install Package” and hit return. A list of available packages will be displayed.
  4. Type “webAgent” and hit return. The package will be installed.

Install manually

  1. In Sublime Text, select “Preferences” > “Browse Packages”. This opens your Sublime Text package directory.
  2. Clone this repo to your Sublime Text package directory.

Notes

Word boundaries in webAgent

A “word boundary” is the boundary between a word character and a non-word character. RegEx has a symbol for word boundaries, \b. RegEx considers these characters to be “word characters”: a-z, A-Z, 0-9, _. In webAgent, the hyphen should also be considered a word character (it's used the same way an underscore is used). Since webAgent's word characters differ from RegEx, we can't use rely on \b to find word boundaries.

To find word boundaries in webAgent, we use lookaheads and lookbehinds that include hyphens as word characters:

# ADD keyword
- match: (?i)(?<![\w-])add(?![\w-])
  1. (?i) modifies the mode of RegEx to be case-insensitive.
  2. (?<![\w-]) is a negative lookbehind that will discard a result if it's preceded by any of these characters: a-z, A-Z, 0-9, _, -. E.G. #VARIABLE-TO-ADD will not match ADD because it's preceded by a hyphen.
  3. add is the main expression of what to match.
  4. (?![\w-]) is a negative lookahead that will discard a result if it's followed by any of these characters: a-z, A-Z, 0-9, _, -. E.G. #ADD-VARIABLE will not match ADD because it's followed by a hyphen.