Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/mod.ts>win_execute

๐Ÿ“š Standard module for denops.vim
Go to Latest
function win_execute
import { win_execute } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";

Like execute() but in the context of window {id}. The window will temporarily be made the current window, without triggering autocommands or changing directory. When executing {command} autocommands will be triggered, this may have unexpected side effects. Use :noautocmd if needed. Example:

call win_execute(winid, 'set syntax=python')

Doing the same with setwinvar() would not trigger autocommands and not actually show syntax highlighting.

Not all commands are allowed in popup windows. When window {id} does not exist then no error is given and an empty string is returned.

Can also be used as a method, the base is passed as the second argument:

GetCommand()->win_execute(winid)

Parameters

denops: Denops
id: unknown
command: unknown
optional
silent: unknown

Returns

Promise<string>