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_list

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

Similar to prop_add(), but attaches a text property at multiple positions in a buffer.

{props} is a dictionary with these fields: 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.

The second argument is a List of Lists where each list specifies the starting and ending position of the text. The first two items {lnum} and {col} specify the starting position of the text where the property will be attached and the last two items {end-lnum} and {end-col} specify the position just after the text.

It is not possible to add a text property with a "text" field here.

Example: call prop_add_list(#{type: 'MyProp', id: 2}, \ [[1, 4, 1, 7], \ [1, 15, 1, 20], \ [2, 30, 3, 30]]

Can also be used as a |method|: GetProp()->prop_add_list([[1, 1, 1, 2], [1, 4, 1, 8]])

Returns

Promise<unknown>