Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

btv.cmdline

btv.cmdline.open(text, opts)

btv.cmdline.open(text, opts) opens the command line from any mode, prefilled with text ("" when nil) and the cursor at its end. opts.kind picks the line: ":" (the default) for an ex command, "/" or "?" for a search. Opened from Insert, the line returns to Insert when it closes, which is how the modeless key layout reaches ex commands without a Normal mode:

btv.cmdline.open("%s/")                -- a substitute, ready for its pattern
btv.cmdline.open("", { kind = "/" })   -- a forward search

Defined in keymap.lua.