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_lines

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

Gets a line-range from the buffer.

Indexing is zero-based, end-exclusive. Negative indices are interpreted as length+1+index: -1 refers to the index past the end. So to get the last element use start=-2 and end=-1.

Out-of-bounds indices are clamped to the nearest valid value, unless strict_indexing is set.

Parameters: {buffer} Buffer handle, or 0 for current buffer {start} First line index {end} Last line index, exclusive {strict_indexing} Whether out-of-bounds should be an error.

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

Parameters

denops: Denops
buffer: unknown
start: unknown
end: unknown
strict_indexing: unknown

Returns

Promise<unknown>