import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/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)