<commit_before># RunMacroFileWithContext

Allows to use context in sublime macro files.


### Installation

This plugin is part of [sublime-enhanced](http://github.com/shagabutdinov/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](http://github.com/shagabutdinov/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",
  }
},
```


### Dependencies

* [Context](https://github.com/shagabutdinov/sublime-context)<commit_msg>readme updated<commit_after># RunMacroFileWithContext

Allows to use context in sublime macro files.


### Installation

This plugin is part of [sublime-enhanced](http://github.com/shagabutdinov/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](http://github.com/shagabutdinov/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

* [Context](https://github.com/shagabutdinov/sublime-context)
{'fraction_non_alphanumeric': 0.14039179104477612, 'fraction_numerical': 0.0, 'mean_word_length': 4.37593984962406, 'pattern_counts': {'":': 20, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1236726', 'n_tokens_mistral': 752, 'n_tokens_neox': 698, 'n_words': 170}