This file contains functions to interact with hint mode.

If you want to bind them to keyboard shortcuts, be sure to prefix them with "hint.". For example, if you want to bind control-[ to reset, use:

bind --mode=hint <C-[> hint.reset

Contrary to the main tridactyl help page, this one doesn't tell you whether a specific function is bound to something. For now, you'll have to make do with :bind and :viewconfig.

Index

Functions

focusBottomHint

  • focusBottomHint(): void

focusLeftHint

  • focusLeftHint(): void

focusNextHint

  • focusNextHint(): void

focusPreviousHint

  • focusPreviousHint(): void

focusRightHint

  • focusRightHint(): void

focusTopHint

  • focusTopHint(): void

hintElements

  • hintElements(elements: Element[], option?: {}): Promise<unknown> | AsyncGenerator<any, any, unknown>
  • A convenient javascript interface to hint on specified html elements. The return value is a promise resolving to the selected element, or an AsyncIterator resolving to the selected elements in rapid mode.

    Example usage:

    tri.hinting_content.hintElements(...).then(element => {tri.dom.simulateClick(element))

    for (await e of tri.hinting_content.hintElements(..., {rapid: true}){tri.dom.simulateClick(e)})

    Parameters

    • elements: Element[]

      a iterator yield html elements

    • Default value option: {} = {}

      a option object. The option.rapid specify whether hint in rapid mode. Default value is false. The option.callback is executed when a hint is selected if specified. The default callback is a no-op.

    Returns Promise<unknown> | AsyncGenerator<any, any, unknown>

    promise resolve to the selected element, or a async iterator in rapid mode.

popKey

  • popKey(): void

pushKey

  • pushKey(key: any): void

pushKeyCodePoint

  • pushKeyCodePoint(codepoint: any): void
  • Covert to char and pushKey(). This is needed because ex commands ignore whitespace.

    Parameters

    • codepoint: any

    Returns void

pushSpace

  • pushSpace(): void

reset

  • reset(): void

selectFocusedHint

  • selectFocusedHint(delay?: boolean): void

Object literals

Const vimpHelper

vimpHelper: object

Helper for vimperator hinting.

Allow customize vimperator hinting filter by overriding functions of the helper object.

filterableTextFilter

filterableTextFilter: null = null

matchHint

  • matchHint(str: any, key: any): any

sanitiseHintText

  • sanitiseHintText(str: any): any