import { histadd } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";
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')