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

x/ddc_vim/deps.ts>fn.charcol

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

Same as col() but returns the character index of the column position given with {expr} instead of the byte position.

Example: With the cursor on '세' in line 5 with text "여보세요":

charcol('.')            returns 3
col('.')                returns 7

Can also be used as a method:

GetPos()->col()

Parameters

denops: Denops
expr: unknown
optional
winid: unknown

Returns

Promise<number>