import { fn } from "https://deno.land/x/ddc_vim@v4.1.0/deps.ts";
const { getcharsearch } = fn;
Return the current character search information as a {dict} with the following entries:
char character previously used for a character
search (`t`, `f`, `T`, or `F`); empty string
if no character search has been performed
forward direction of character search; 1 for forward,
0 for backward
until type of character search; 1 for a `t` or `T`
character search, 0 for an `f` or `F`
character search
This can be useful to always have ;
and ,
search
forward/backward regardless of the direction of the previous
character search:
:nnoremap <expr> ; getcharsearch().forward ? ';' : ','
:nnoremap <expr> , getcharsearch().forward ? ',' : ';'
Also see setcharsearch()
.
Parameters
denops: Denops