Skip to main content
Module

x/denops_std/function/mod.ts>charcol

📚 Standard module for denops.vim
Go to Latest
function charcol
import { charcol } from "https://deno.land/x/denops_std@v4.3.0/function/mod.ts";

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

Returns

Promise<number>