Skip to main content
Module

x/denops_std/function/mod.ts>getcharpos

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

Get the position for String {expr}. Same as |getpos()| but the column number in the returned List is a character index instead of a byte index. If |getpos()| returns a very large column number, equal to |v:maxcol|, then getcharpos() will return the character index of the last character. Example: With the cursor on '세' in line 5 with text "여보세요": getcharpos('.') returns [0, 5, 3, 0] getpos('.') returns [0, 5, 7, 0] Can also be used as a |method|: GetMark()->getcharpos()

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>