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

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

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

Get the position for {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, such as 2147483647, 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>