Skip to main content
Module

x/denops_std/function/mod.ts>islocked

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

The result is a Number, which is |TRUE| when {expr} is the name of a locked variable. The string argument {expr} must be the name of a variable, |List| item or |Dictionary| entry, not the variable itself! Example: :let alist = [0, ['a', 'b'], 2, 3] :lockvar 1 alist :echo islocked('alist') " 1 :echo islocked('alist[1]') " 0 When {expr} is a variable that does not exist you get an error message. Use |exists()| to check for existence. In Vim9 script it does not work for local variables. Can also be used as a |method|: GetName()->islocked()

Parameters

denops: Denops
expr: unknown

Returns

Promise<unknown>