Skip to content

Latest commit

 

History

History
91 lines (55 loc) · 2.79 KB

API.md

File metadata and controls

91 lines (55 loc) · 2.79 KB

Omnibar

The omnibar provides kinds of functions that need user input, for example,

  • Open url(from both bookmarks and history) with t
  • Open bookmarks with b
  • Open search engines with og / ow ...
  • Open commands with :

Key bindings in Omnibar:

  • Enter to open selected item and close omnibar.
  • Ctrl-Enter to open selected item, but keep omnibar open for more items to be opened.
  • Shift-Enter to open selected item in current tab and close omnibar. If you'd like to open in current tab by default, please use go.
  • Tab to forward cycle through the candidates.
  • Shift-Tab to backward cycle through the candidates.
  • Ctrl-. to show results of next page
  • Ctrl-, to show results of previous page
  • Ctrl-c to copy all listed items
  • In omnibar opened with t:

Ctrl - d to delete from bookmark or history

  • In omnibar opened with b:

Ctrl - Shift - <any letter> to create vim-like global mark

cmap could be used for Omnibar to change mappings, for example:

cmap('<Ctrl-n>', '<Tab>');
cmap('<Ctrl-p>', '<Shift-Tab>');

Parameters

Returns Omnibar Omnibar instance

listURLs

List URLs like {url: "https://github.com", title: "github.com"} beneath omnibar

Parameters

  • items Array Array of url items with title.
  • showFolder boolean True to show a item as folder if it has no property url.

Examples

Omnibar.listURLs ([{url: 'http://google.com', title: 'Google'}], false)

Returns undefined

onOpen

List commands when OmniBar opens

Returns undefined

onEnter

Execute command after pressing the return key.

Displays any output if the command.

Returns boolean

StatusBar

The status bar displays the status of Surfingkeys current mode: Normal, visual, etc.

Parameters

Returns StatusBar StatusBar instance

open

Opens the status bar

Returns undefined