Skip to main content
Module

x/ddc_vim/deps.ts>fn.histadd

Dark deno-powered completion framework for neovim/Vim
Latest
function fn.histadd
import { fn } from "https://deno.land/x/ddc_vim@v4.3.1/deps.ts";
const { histadd } = fn;

Add the String {item} to the history {history} which can be one of: "cmd" or ":" command line history "search" or "/" search pattern history "expr" or "=" typed expression history "input" or "@" input line history "debug" or ">" debug command history empty the current or last used history The {history} string does not need to be the whole name, one character is sufficient. If {item} does already exist in the history, it will be shifted to become the newest entry. The result is a Number: TRUE if the operation was successful, otherwise FALSE is returned.

Example:

:call histadd("input", strftime("%Y %b %d"))
:let date=input("Enter date: ")

This function is not available in the sandbox.

Can also be used as a method, the base is passed as the second argument:

GetHistory()->histadd('search')

Parameters

denops: Denops
history: unknown
item: unknown

Returns

Promise<number>