A spell for replacing text inside/after delimiters.
delimiter
- regexp pattern to be matchedreplacement
- text used for replacement -$clipboard
is replaced with the clipboard content;$cursor
will be replaced by the cursor after the replacementwhere
inside
- replace text inside/between the delimitersafter
- replace text after the delimiter
{
"name": "Replace single quoted content with clipboard",
"context": {
"scope": ["string\\.quoted\\.single"]
},
"spell": "replace_text",
"args": {
"where": "inside",
"delimiter": "'",
"replacement": "$clipboard"
}
}
{
"name": "Remove content after colon",
"context": {
"line_matches": [": "]
},
"spell": "replace_text",
"args": {
"where": "after",
"delimiter": ":",
"replacement": ""
}
}