hledger-iadd-1.3.12: A terminal UI as drop-in replacement for hledger add

Safe HaskellNone
LanguageHaskell2010

Brick.Widgets.Edit.EmacsBindings

Description

Widget like Brick.Widgets.Edit, but with more emacs style keybindings.

This is also a complete wrapper around the Brick.Widgets.Edit API to retain compatability with older brick versions.

See handleEditorEvent for a list of added keybindings.

Synopsis

Documentation

data Editor n Source #

Wrapper around Editor, but specialized to Text

editorText :: n -> ([Text] -> Widget n) -> Maybe Int -> Text -> Editor n Source #

Wrapper for editorText specialized to Text

getEditContents :: Editor n -> [Text] Source #

Wrapper for getEditContents specialized to Text

applyEdit :: (TextZipper Text -> TextZipper Text) -> Editor n -> Editor n Source #

Wrapper for applyEdit specialized to Text

handleEditorEvent :: Event -> Editor n -> EventM n (Editor n) Source #

Same as handleEditorEvent, but with more emacs-style keybindings and specialized to Text

Specifically:

  • Ctrl-f: Move forward one character
  • Ctrl-b: Move backward one character
  • Alt-f: Move forward one word
  • Alt-b: Move backward one word
  • Alt-Backspace: Delete the previous word
  • Ctrl-w: Delete the previous word
  • Alt-d: Delete the next word

renderEditor :: (Ord n, Show n) => Bool -> Editor n -> Widget n Source #

Wrapper for renderEditor specialized to Text