License | GPL-2 |
---|---|
Maintainer | [email protected] |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Extensions |
|
Yi.Keymap
Contents
Synopsis
- data Action
- emptyAction :: Action
- type Interact ev a = I ev Action a
- type KeymapM a = Interact Event a
- type Keymap = KeymapM ()
- type KeymapEndo = Keymap -> Keymap
- type KeymapProcess = P Event Action
- data KeymapSet = KeymapSet {}
- topKeymapA :: Lens' KeymapSet Keymap
- insertKeymapA :: Lens' KeymapSet Keymap
- extractTopKeymap :: KeymapSet -> Keymap
- modelessKeymapSet :: Keymap -> KeymapSet
- newtype YiM a = YiM {}
- withUI :: (UI Editor -> IO a) -> YiM a
- unsafeWithEditor :: Config -> MVar YiVar -> EditorM a -> IO a
- readEditor :: MonadEditor m => (Editor -> a) -> m a
- catchDynE :: Exception exception => YiM a -> (exception -> YiM a) -> YiM a
- catchJustE :: Exception e => (e -> Maybe b) -> YiM a -> (b -> YiM a) -> YiM a
- handleJustE :: Exception e => (e -> Maybe b) -> (b -> YiM a) -> YiM a -> YiM a
- class YiAction a x | a -> x where
- makeAction :: Show x => a -> Action
- data Yi = Yi {}
- data IsRefreshNeeded
- data YiVar = YiVar {}
- write :: (MonadInteract m Action ev, YiAction a x, Show x) => a -> m ()
- withModeY :: (forall syntax. Mode syntax -> YiM ()) -> YiM ()
- yiSubprocessesA :: Lens' YiVar (Map SubprocessId SubprocessInfo)
- yiEditorA :: Lens' YiVar Editor
- yiSubprocessIdSupplyA :: Lens' YiVar SubprocessId
- yiConfigA :: Lens' Yi Config
- yiInputA :: Lens' Yi ([Event] -> IO ())
- yiOutputA :: Lens' Yi (IsRefreshNeeded -> [Action] -> IO ())
- yiUiA :: Lens' Yi (UI Editor)
- yiVarA :: Lens' Yi (MVar YiVar)
Documentation
Constructors
forall a.Show a => YiA (YiM a) | |
forall a.Show a => EditorA (EditorM a) | |
forall a.Show a => BufferA (BufferM a) |
emptyAction :: Action Source #
type KeymapEndo = Keymap -> Keymap Source #
Constructors
KeymapSet | |
Fields
|
extractTopKeymap :: KeymapSet -> Keymap Source #
modelessKeymapSet :: Keymap -> KeymapSet Source #
The type of user-bindable functions TODO: doc how these are actually user-bindable are they?
Instances
MonadFail YiM Source # | |
Applicative YiM Source # | |
Functor YiM Source # | |
Monad YiM Source # | |
MonadEditor YiM Source # | |
MonadReader Yi YiM Source # | |
MonadState Editor YiM Source # | |
MonadBase IO YiM Source # | |
HookType (YiM a) Source # | |
Defined in Yi.Hooks Methods runHookImpl :: YiConfigVariable var => (var -> YiM a) -> YiM a | |
YiAction (YiM x) x Source # | |
readEditor :: MonadEditor m => (Editor -> a) -> m a Source #
class YiAction a x | a -> x where Source #
Methods
makeAction :: Show x => a -> Action Source #
Constructors
Yi | |
data IsRefreshNeeded Source #
Constructors
MustRefresh | |
NoNeedToRefresh |
Instances
Show IsRefreshNeeded Source # | |
Defined in Yi.Types Methods showsPrec :: Int -> IsRefreshNeeded -> ShowS # show :: IsRefreshNeeded -> String # showList :: [IsRefreshNeeded] -> ShowS # | |
Eq IsRefreshNeeded Source # | |
Defined in Yi.Types Methods (==) :: IsRefreshNeeded -> IsRefreshNeeded -> Bool # (/=) :: IsRefreshNeeded -> IsRefreshNeeded -> Bool # |
Constructors
YiVar | |
Fields |
write :: (MonadInteract m Action ev, YiAction a x, Show x) => a -> m () Source #
write a
returns a keymap that just outputs the action a
.
withModeY :: (forall syntax. Mode syntax -> YiM ()) -> YiM () Source #
withModeY f
runs f
on the current buffer's mode. As this runs in
the YiM monad, we're able to do more than with just withModeB
such as
prompt the user for something before running the action.