preview_column_edit
MCP tools › Code insight and refactoring
Preview a column (block) edit as an ⌥-drag selection does it: the rectangle between two corners (0-based line and column) selects the same columns on every line, lines shorter than that get a caret at their end, and the replacement is typed into each. Returns the parts selected as character ranges and the resulting text; the file is not written.
Its results carry text from files, language_server: the client is told to treat that as data, never as instructions.
| Capability | code.preview_column_edit |
|---|---|
| Area | Code insight and refactoring |
| Access | reads only |
| Reaches | — |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative file. |
from_linerequired | integer | 0-based line of one corner.minimum 0 |
from_columnrequired | integer | 0-based column of that corner.minimum 0 |
to_linerequired | integer | 0-based line of the other corner.minimum 0 |
to_columnrequired | integer | 0-based column of the other corner.minimum 0 |
replacementrequired | string | Text typed into every line of the rectangle (empty deletes it). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project preview_column_edit '{"path":"<string>","from_line":1,"from_column":1,"to_line":1,"to_column":1,"replacement":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "path", "from_line", "from_column", "to_line", "to_column", "replacement" ], "properties": { "path": { "description": "Workspace-relative file.", "type": "string" }, "from_line": { "description": "0-based line of one corner.", "type": "integer", "minimum": 0 }, "from_column": { "description": "0-based column of that corner.", "type": "integer", "minimum": 0 }, "to_line": { "description": "0-based line of the other corner.", "type": "integer", "minimum": 0 }, "to_column": { "description": "0-based column of the other corner.", "type": "integer", "minimum": 0 }, "replacement": { "description": "Text typed into every line of the rectangle (empty deletes it).", "type": "string" } }}