Skip to main content
Module

x/ddc_vim/deps.ts>fn.getreg

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.getreg
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { getreg } = fn;

The result is a String, which is the contents of register {regname}. Example: :let cliptext = getreg('*') When {regname} was not set the result is an empty string. getreg('=') returns the last evaluated value of the expression register. (For use in maps.) getreg('=', 1) returns the expression itself, so that it can be restored with |setreg()|. For other registers the extra argument is ignored, thus you can always give it. If {list} is present and |TRUE|, the result type is changed to |List|. Each list item is one text line. Use it if you care about zero bytes possibly present inside register: without third argument both NLs and zero bytes are represented as NLs (see |NL-used-for-Nul|). When the register was not set an empty list is returned. If {regname} is not specified, |v:register| is used. In |Vim9-script| {regname} must be one character. Can also be used as a |method|: GetRegname()->getreg()

Parameters

denops: Denops
optional
regname: unknown
optional
v1: unknown
optional
list: unknown

Returns

Promise<unknown>