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

x/denops_std/function/mod.ts>setcharpos

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

Same as setpos() but uses the specified column number as the character index instead of the byte index in the line.

Example: With the text "์—ฌ๋ณด์„ธ์š”" in line 8:

call setcharpos('.', [0, 8, 4, 0])

positions the cursor on the fourth character '์š”'.

call setpos('.', [0, 8, 4, 0])

positions the cursor on the second character '๋ณด'.

Can also be used as a method:

GetPosition()->setcharpos('.')

Parameters

denops: Denops
expr: unknown
list: unknown

Returns

Promise<number>