Operation Types
Mouse supports six operation types:
INSERT
Add new content at a specific line:``json
{
"operation": "insert",
"afterLine": 10,
"content": "// New comment"
}
`
REPLACE
Find and replace text:`json
{
"operation": "replace",
"find": "oldValue",
"replace": "newValue",
"replaceAll": true
}
`
DELETE
Remove lines:`json
{
"operation": "delete",
"region": [10, 15]
}
`
REPLACE_RANGE
Character-level precision:`json
{
"operation": "replace_range",
"region": [[10, 5], [10, 20]],
"content": "newText"
}
`
FOR_LINES
Apply same change to multiple lines:`json
{
"operation": "for_lines",
"lineRange": [10, 50],
"colRange": [0, 0],
"content": "// "
}
`
ADJUST
Move content without modification:`json
{
"operation": "adjust",
"rect": [[10, 29], 13, 41],
"move": [0, 82]
}
``