Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.win_execute

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.win_execute
import { fn } from "https://deno.land/x/ddc_vim@v4.1.0/deps.ts";
const { win_execute } = fn;

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>