Skip to main content
Module

x/denops_std/function/mod.ts>prompt_setinterrupt

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

Set a callback for buffer {buf} to {expr}. When {expr} is an empty string the callback is removed. This has only effect if {buf} has 'buftype' set to "prompt".

This callback will be invoked when pressing CTRL-C in Insert mode. Without setting a callback Vim will exit Insert mode, as in any buffer.

Can also be used as a method:

GetBuffer()->prompt_setinterrupt(callback)

only available when compiled with the +channel feature

Parameters

denops: Denops
buf: unknown
expr: unknown

Returns

Promise<void>