Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.digraph_get

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

Return the digraph of {chars}. This should be a string with exactly two characters. If {chars} are not just two characters, or the digraph of {chars} does not exist, an error is given and an empty string is returned.

The character will be converted from Unicode to 'encoding' when needed. This does require the conversion to be available, it might fail.

Also see digraph_getlist().

Examples:

" Get a built-in digraph
:echo digraph_get('00')         " Returns '∞'

" Get a user-defined digraph
:call digraph_set('aa', 'あ')
:echo digraph_get('aa')         " Returns 'あ'

Can also be used as a method:

GetChars()->digraph_get()

This function works only when compiled with the +digraphs feature. If this feature is disabled, this function will display an error message.

Parameters

denops: Denops
chars: unknown

Returns

Promise<string>