Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

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

Attach a text property at position {lnum}, {col}. {col} is counted in bytes, use one for the first column. If {lnum} is invalid an error is given. If {col} is invalid an error is given. {props} is a dictionary with these fields: length length of text in bytes, can only be used for a property that does not continue in another line; can be zero end_lnum line number for the end of text (inclusive) end_col column just after the text; not used when "length" is present; when {col} and "end_col" are equal, and "end_lnum" is omitted or equal to {lnum}, this is a zero-width text property bufnr buffer to add the property to; when omitted the current buffer is used id user defined ID for the property; must be a number; when omitted zero is used type name of the text property type All fields except "type" are optional. It is an error when both "length" and "end_lnum" or "end_col" are given. Either use "length" or "end_col" for a property within one line, or use "end_lnum" and "end_col" for a property that spans more than one line. When neither "length" nor "end_col" are given the property will be zero-width. That means it will move with the text, as a kind of mark. One character will be highlighted, if the type specifies highlighting. The property can end exactly at the last character of the text, or just after it. In the last case, if text is appended to the line, the text property size will increase, also when the property type does not have "end_incl" set. "type" will first be looked up in the buffer the property is added to. When not found, the global property types are used. If not found an error is given. Can also be used as a |method|: GetLnum()->prop_add(col, props)

Parameters

denops: Denops
lnum: unknown
col: unknown
props: unknown

Returns

Promise<unknown>