diff --git a/README.md b/README.md index 4f1a9e5..deccb90 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,14 @@ LessThan(expected := 0, actual := 0); GreaterThan(expected := 0, actual := 0); ``` +## Code actions + +### Increment / Decrement + +![increment](doc/img/inc.gif) + +Select the variable and enter the prefixes: **increment** or **decrement** + ## Surround with ![surround](doc/img/surround.gif) diff --git a/doc/img/inc.gif b/doc/img/inc.gif new file mode 100644 index 0000000..9f9c136 Binary files /dev/null and b/doc/img/inc.gif differ diff --git a/snippets/inc.json b/snippets/inc.json new file mode 100644 index 0000000..b52ca3a --- /dev/null +++ b/snippets/inc.json @@ -0,0 +1,22 @@ +{ + "increment_variable": { + "scope": "st", + "prefix": [ + "increment" + ], + "body": [ + "${TM_SELECTED_TEXT} := ${TM_SELECTED_TEXT} + ${1:1};" + ], + "description": "Increment variable" + }, + "decrement_variable": { + "scope": "st", + "prefix": [ + "decrement" + ], + "body": [ + "${TM_SELECTED_TEXT} := ${TM_SELECTED_TEXT} - ${1:1};" + ], + "description": "Decrement variable" + } +}