A spell for replacing text inside/after delimiters.
delimiter- regexp pattern to be matchedreplacement- text used for replacement -$clipboardis replaced with the clipboard content;$cursorwill be replaced by the cursor after the replacementwhereinside- 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": ""
}
}