yi-0.7.1: The Haskell-Scriptable Editor

Safe HaskellNone

Yi.Keymap

Synopsis

Documentation

data Action Source

Constructors

forall a . Show a => YiA (YiM a) 
forall a . Show a => EditorA (EditorM a) 
forall a . Show a => BufferA (BufferM a) 

type Interact ev a = I ev Action aSource

data KeymapSet Source

Constructors

KeymapSet 

Fields

topKeymap :: Keymap

Content of the top-level loop.

startInsertKeymap :: Keymap

Startup when entering insert mode

insertKeymap :: Keymap

For insertion-only modes

startTopKeymap :: Keymap

Startup bit, to execute only once at the beginning.

newtype YiM a Source

The type of user-bindable functions

Constructors

YiM 

Fields

runYiM :: ReaderT Yi IO a
 

withUI :: (UI -> IO a) -> YiM aSource

readEditor :: MonadEditor m => (Editor -> a) -> m aSource

catchDynE :: Exception exception => YiM a -> (exception -> YiM a) -> YiM aSource

catchJustESource

Arguments

:: Exception e 
=> (e -> Maybe b)

Predicate to select exceptions

-> YiM a

Computation to run

-> (b -> YiM a)

Handler

-> YiM a 

handleJustE :: Exception e => (e -> Maybe b) -> (b -> YiM a) -> YiM a -> YiM aSource

shutdown :: YiM ()Source

Shut down all of our threads. Should free buffers etc.

class YiAction a x | a -> x whereSource

Methods

makeAction :: Show x => a -> ActionSource

Instances

YiAction Action () 
YiAction (IO x) x 
YiAction (BufferM x) x 
YiAction (EditorM x) x 
YiAction (YiM x) x 
(YiAction a x, Promptable r) => YiAction (r -> a) x 

data Yi Source

Constructors

Yi 

Fields

yiUi :: UI
 
input :: Event -> IO ()

input stream

output :: [Action] -> IO ()

output stream

yiConfig :: Config
 
yiVar :: MVar YiVar

The only mutable state in the program

write :: (MonadInteract m Action ev, YiAction a x, Show x) => a -> m ()Source

write a returns a keymap that just outputs the action a.