yi-core-0.19.4: Yi editor core library

License | GPL-2
Maintainer | yi-devel@googlegroups.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Extensions

- Cpp
- ScopedTypeVariables
- OverloadedStrings
- DeriveDataTypeable
- TypeSynonymInstances
- FlexibleInstances
- RankNTypes
- ExplicitForAll

Yi.History

Description

‘Command history’ implementation.

Synopsis

- newtype Histories = Histories (Map Text History)
- data History = History {
  - _historyCurrent :: Int
  - _historyContents :: [Text]
  - _historyPrefix :: Text
  }
- dynKeyA :: (Default v, Ord k) => k -> Lens' (Map k v) v
- miniBuffer :: Text
- historyUp :: EditorM ()
- historyDown :: EditorM ()
- historyStart :: EditorM ()
- historyStartGen :: Text -> EditorM ()
- historyFinish :: EditorM ()
- historyFinishGen :: Text -> EditorM Text -> EditorM ()
- historyFind :: [Text] -> Int -> Int -> Int -> Text -> Int
- historyMove :: Text -> Int -> EditorM ()
- historyMoveGen :: Text -> Int -> EditorM Text -> EditorM Text
- historyPrefixSet :: Text -> EditorM ()
- historyPrefixSet' :: Text -> Text -> EditorM ()
- setHistory :: (MonadEditor m, Functor m) => Text -> History -> Map Text History -> m ()

# Documentation

newtype Histories Source #

Constructors

Histories (Map Text History) |

#### Instances

Instances details

Binary Histories Source # |
Instance details Defined in Yi.History Methods put :: Histories -> Put Source # get :: Get Histories Source # putList :: [Histories] -> Put Source #
Default Histories Source # |
Instance details Defined in Yi.History Methods def :: Histories Source #
Show Histories Source # |
Instance details Defined in Yi.History Methods showsPrec :: Int -> Histories -> ShowS Source # show :: Histories -> String Source # showList :: [Histories] -> ShowS Source #
Eq Histories Source # |
Instance details Defined in Yi.History Methods (==) :: Histories -> Histories -> Bool Source # (/=) :: Histories -> Histories -> Bool Source #
YiVariable Histories Source # |
Instance details Defined in Yi.History

data History Source #

Constructors

History |

Fields

- _historyCurrent :: Int
- _historyContents :: [Text]
- _historyPrefix :: Text

#### Instances

Instances details

Binary History Source # |
Instance details Defined in Yi.History Methods put :: History -> Put Source # get :: Get History Source # putList :: [History] -> Put Source #
Default History Source # |
Instance details Defined in Yi.History Methods def :: History Source #
Show History Source # |
Instance details Defined in Yi.History Methods showsPrec :: Int -> History -> ShowS Source # show :: History -> String Source # showList :: [History] -> ShowS Source #
Eq History Source # |
Instance details Defined in Yi.History Methods (==) :: History -> History -> Bool Source # (/=) :: History -> History -> Bool Source #

dynKeyA :: (Default v, Ord k) => k -> Lens' (Map k v) v Source #

miniBuffer :: Text Source #

historyUp :: EditorM () Source #

historyDown :: EditorM () Source #

historyStart :: EditorM () Source #

historyStartGen :: Text -> EditorM () Source #

Start an input session with History

historyFinish :: EditorM () Source #

historyFinishGen :: Text -> EditorM Text -> EditorM () Source #

Finish the current input session with history.

historyFind :: [Text] -> Int -> Int -> Int -> Text -> Int Source #

historyMove :: Text -> Int -> EditorM () Source #

historyMoveGen :: Text -> Int -> EditorM Text -> EditorM Text Source #

historyPrefixSet :: Text -> EditorM () Source #

historyPrefixSet' :: Text -> Text -> EditorM () Source #

setHistory Source #

Arguments

:: (MonadEditor m, Functor m) |
=> Text | identifier
-> History | History to set
-> Map Text History | Map of existing histories
-> m () |

Helper that sets the given history at ident and `putEditorDyn`s the result.