A complex edit that will be applied in one transaction on a TextEditor. This holds a description of the edits and if the edits are valid (i.e. no overlapping regions, document was not changed in the meantime, etc.) they can be applied on a {@link TextDocument document} associated with a {@link TextEditor text editor}.
A complex edit that will be applied in one transaction on a TextEditor.
This holds a description of the edits and if the edits are valid (i.e. no overlapping regions, document was not changed in the meantime, etc.)
they can be applied on a {@link TextDocument document} associated with a {@link TextEditor text editor}.(delete text-editor-edit location)Delete a certain text region.
Parameters:
location: Range | Selection - The range this operation should remove.Returns: void
Delete a certain text region. **Parameters:** - `location`: `Range | Selection` - The range this operation should remove. **Returns:** `void`
(insert text-editor-edit location value)Insert text at a location.
You can use \r\n or \n in value and they will be normalized to the current {@link TextDocument document}.
Although the equivalent text edit can be made with {@link TextEditorEdit.replace replace}, insert will produce a different resulting selection (it will get moved).
Parameters:
location: Position - The position where the new text should be inserted.value: string - The new text this operation should insert.Returns: void
Insert text at a location.
You can use `\r\n` or `\n` in `value` and they will be normalized to the current {@link TextDocument document}.
Although the equivalent text edit can be made with {@link TextEditorEdit.replace replace}, `insert` will produce a different resulting selection (it will get moved).
**Parameters:**
- `location`: `Position` - The position where the new text should be inserted.
- `value`: `string` - The new text this operation should insert.
**Returns:** `void`(replace text-editor-edit location value)Replace a certain text region with a new value.
You can use \r\n or \n in value and they will be normalized to the current {@link TextDocument document}.
Parameters:
location: Range | Position | Selection - The range this operation should remove.value: string - The new text this operation should insert after removing location.Returns: void
Replace a certain text region with a new value.
You can use `\r\n` or `\n` in `value` and they will be normalized to the current {@link TextDocument document}.
**Parameters:**
- `location`: `Range | Position | Selection` - The range this operation should remove.
- `value`: `string` - The new text this operation should insert after removing `location`.
**Returns:** `void`(set-end-of-line text-editor-edit end-of-line)Set the end of line sequence.
Parameters:
end-of-line: EndOfLine - The new end of line for the {@link TextDocument document}.Returns: void
Set the end of line sequence.
**Parameters:**
- `end-of-line`: `EndOfLine` - The new end of line for the {@link TextDocument document}.
**Returns:** `void`cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |