Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

📚 Standard module for denops.vim
Go to Latest
function nvim_buf_get_text
import { nvim_buf_get_text } from "https://deno.land/x/denops_std@v5.1.0/function/nvim/mod.ts";

Gets a range from the buffer.

This differs from nvim_buf_get_lines() in that it allows retrieving only portions of a line.

Indexing is zero-based. Row indices are end-inclusive, and column indices are end-exclusive.

Prefer nvim_buf_get_lines() when retrieving entire lines.

Parameters: {buffer} Buffer handle, or 0 for current buffer {start_row} First line index {start_col} Starting column (byte offset) on first line {end_row} Last line index, inclusive {end_col} Ending column (byte offset) on last line, exclusive {opts} Optional parameters. Currently unused.

Return: Array of lines, or empty array for unloaded buffer.

Parameters

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

Returns

Promise<unknown>