Module Vim

val init : unit -> unit

init must be called prior to input or command, and must only be called once.

init initializes and sets up initial global state for Vim.

val input : string -> unit

input(s) sends a single keystroke to Vim.

The value s may be of the following form:

  • A single ASCII character, ie "a" or ":"
  • A Vim key, ie "<cr>" or "<bs>"
  • A Vim key with modifiers, ie "<C-a>"

The keystroke is processed synchronously.

val command : string -> unit

command(cmd) executes cmd as an Ex command.

For example, command("edit! buf.txt") would run the edit! command and open buf.txt.

You may use any valid Ex command, although you must omit the leading semicolon.

The command cmd is processed synchronously.

module AutoCommands : sig ... end
module Buffer : sig ... end
module BufferMetadata : sig ... end
module BufferUpdate : sig ... end
module Cursor : sig ... end
module Mode : sig ... end
module Position : sig ... end
module Range : sig ... end
module Visual : sig ... end