Skip to content

VimApi.defineMotion method

VimApi › defineMotion

Unofficial

Define a new Vim motion with the given name and handler.

Signature:

defineMotion(name: string, fn: (cm: VimEditor, head: object, motionArgs: object, vim: VimStateVim) => object): void

Parameters:

Parameter Type Description
name string The name of the motion.
fn (cm: VimEditor, head: object, motionArgs: object, vim: VimStateVim) => object The handler function for the motion.

Returns: void