Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/nvim/mod.ts>nvim_buf_set_text

๐Ÿ“š Standard module for denops.vim
Go to Latest
function nvim_buf_set_text
import { nvim_buf_set_text } from "https://deno.land/x/denops_std@v3.9.0/function/nvim/mod.ts";

Sets (replaces) a range in the buffer This is recommended over nvim_buf_set_lines when only modifying parts of a line, as extmarks will be preserved on non-modified parts of the touched lines. Indexing is zero-based and end-exclusive. To insert text at a given index, set start and end ranges to the same index. To delete a range, set replacement to an array containing an empty string, or simply an empty array. Prefer nvim_buf_set_lines when adding or deleting entire lines only. Parameters: ~ {buffer} Buffer handle, or 0 for current buffer {start_row} First line index {start_column} First column {end_row} Last line index {end_column} Last column {replacement} Array of lines to use as replacement

Parameters

denops: Denops
buffer: unknown
start_row: unknown
start_col: unknown
end_row: unknown
end_col: unknown
replacement: unknown

Returns

Promise<unknown>