Skip to main content
Module

x/ddc_vim/deps.ts>fn.getcurpos

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.getcurpos
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { getcurpos } = fn;

Get the position of the cursor. This is like getpos('.'), but includes an extra item in the list: [bufnum, lnum, col, off, curswant] ~ The "curswant" number is the preferred column when moving the cursor vertically. Also see |getpos()|. This can be used to save and restore the cursor position: let save_cursor = getcurpos() MoveTheCursorAround call setpos('.', save_cursor) Note that this only works within the window. See |winrestview()| for restoring more state.