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

Run​Macro​File​With​Context

by shagabutdinov ALL

No description provided

Details

  • 1.0.0
  • github.​com
  • github.​com
  • 10 years ago
  • 15 minutes ago
  • 10 years ago

Installs

  • Total 2K
  • Win 1K
  • Mac 369
  • Linux 199
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 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17
Windows 0 0 0 0 0 0 0 0 0 1 1 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 0 1 1 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 1 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 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