import { fn } from "https://deno.land/x/ddc_vim@v0.0.12/deps.ts";
const { setline } = fn;
Set line {lnum} of the current buffer to {text}. To insert lines use |append()|. To set lines in another buffer use |setbufline()|.
{lnum} is used like with |getline()|. When {lnum} is just below the last line the {text} will be added as a new line.
If this succeeds, 0 is returned. If this fails (most likely because {lnum} is invalid) 1 is returned.
Example: :call setline(5, strftime("%c"))
When {text} is a |List| then line {lnum} and following lines will be set to the items in the list. Example: :call setline(5, ['aaa', 'bbb', 'ccc']) This is equivalent to: :for [n, l] in [[5, 'aaa'], [6, 'bbb'], [7, 'ccc']] : call setline(n, l) :endfor
Note: The '[ and '] marks are not set.