Skip to main content
Module

x/ddc_vim/deps.ts>fn.line

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

The result is a Number, which is the line number of the file position given with {expr}. The accepted positions are: . the cursor position $ the last line in the current buffer 'x position of mark x (if the mark is not set, 0 is returned) w0 first line visible in current window (one if the display isn't updated, e.g. in silent Ex mode) w$ last line visible in current window (this is one less than "w0" if no lines are visible) v In Visual mode: the start of the Visual area (the cursor is the end). When not in Visual mode returns the cursor position. Differs from |'<| in that it's updated right away. Note that a mark in another file can be used. The line number then applies to another buffer. To get the column number use |col()|. To get both use |getpos()|. Examples: line(".") line number of the cursor line("'t") line number of mark t line("'" . marker) line number of mark marker To jump to the last known position when opening a file see |last-position-jump|. Can also be used as a |method|: GetValue()->line()

Parameters

denops: Denops
expr: string

Returns

Promise<number>