Skip to main content
Latest
function fn.charcol
import { fn } from "https://deno.land/x/denops_lsputil@v0.9.4/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>