Text actions
Text actions are used to insert, replace, highlight, delete or unselect text in the editor.
Most of these actions make use of the path
property to specify the location of the file, and the position
property to specify the location where the action should be performed.
For the position
property, you can use the following values:
number
: The line numbernumber:number
: The start and end line numbernumber,number
: The start line and characternumber,number:number,number
: The start line and character and the end line and character- The
start
andend
keywords can also be used instead of the line numbersstart
will be replaced by the first line numberend
will be replaced by the last line number
Examples:
Highlight text
Highlight text in the editor at a specific location.
Position cursor
Position your cursor in the editor at a specific location.
Insert text
Insert text in the editor at a specific location.
Replace text
Replace text in the editor at a specific location.
Write single line
Write a single line of text in the editor at the current location or specific location.
Unselect text
Unselect text in the editor at a specific location.
Delete text
Delete text in the editor at a specific location.