Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/vim/mod.ts>setcellwidths

๐Ÿ“š Standard module for denops.vim
Go to Latest
function setcellwidths
import { setcellwidths } from "https://deno.land/x/denops_std@v3.9.0/function/vim/mod.ts";

Specify overrides for cell widths of character ranges. This tells Vim how wide characters are, counted in screen cells. This overrides 'ambiwidth'. Example: setcellwidths([[0xad, 0xad, 1], \ [0x2194, 0x2199, 2]]) The {list} argument is a list of lists with each three numbers. These three numbers are [low, high, width]. "low" and "high" can be the same, in which case this refers to one character. Otherwise it is the range of characters from "low" to "high" (inclusive). "width" is either 1 or 2, indicating the character width in screen cells. An error is given if the argument is invalid, also when a range overlaps with another. Only characters with value 0x100 and higher can be used. To clear the overrides pass an empty list: setcellwidths([]); You can use the script $VIMRUNTIME/tools/emoji_list.vim to see the effect for known emoji characters.

Parameters

denops: Denops
list: unknown

Returns

Promise<unknown>