Insert lines
nvim_insert_linesInsert multi-line text into a file at a specified line number. Saves automatically by default, and allows appending by choosing a line beyond the end.
Instructions
Insert text before the given line, 1-based. Use a line beyond the end to append. Saves by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Insert before this line, 1-based | |
| path | Yes | File path | |
| save | No | Write the buffer, default true | |
| text | Yes | Text to insert; use \n for several lines |