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

Run​Macro​File​With​Context

by shagabutdinov ALL

No description provided

Details

Installs

  • Total 2K
  • Win 1K
  • Mac 367
  • Linux 197
Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 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
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 1
Mac 0 0 0 0 0 1 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 0 0 0 0 0 0 0 1 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 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

RunMacroFileWithContext

Allows to use context in sublime macro files.

Installation

This plugin is part of sublime-enhanced plugin set. You can install sublime-enhanced and this plugin will be installed automatically.

If you would like to install this package separately check “Installing packages separately” section of sublime-enhanced package.

Usage

Whenever you want to use context in macro file change use “run_macro_file_with_context” command instead of regular “run_macro_file”.

Example command:

{
  "command": "run_macro_file_with_context",
  "args": {
    "file": "Packages/User/macro/mymacro.sublime-macro",
  }
},

Example macro:

[
  {
    "command": "insert",
    "args": {
      "characters": ".",
    },
    "context": [
      {"key": "preceding_text_begin", "operator": "regex_contains", "operand": ".(?<!\\.)$"},
    ]
  },

  {
    "command": "insert",
    "args": {
      "characters": ";",
    },
    "context": [
      {"key": "following_text_end", "operator": "regex_contains", "operand": ";$"},
    ]
  },


]

Dependencies