| License | GPL-2 | 
|---|---|
| Maintainer | yi-devel@googlegroups.com | 
| Stability | experimental | 
| Portability | portable | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
| Extensions | 
  | 
Yi.Types
Description
This module is the host of the most prevalent types throughout Yi. It is unfortunately a necessary evil to avoid use of bootfiles.
You're encouraged to import from more idiomatic modules which will re-export these where appropriate.
- data Action
 - emptyAction :: Action
 - class (Default a, Binary a, Typeable a) => YiVariable a
 - class (Default a, Typeable a) => YiConfigVariable a
 - 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 IsRefreshNeeded
 - data Yi = Yi {}
 - data YiVar = YiVar {}
 - newtype YiM a = YiM {}
 - unsafeWithEditor :: Config -> MVar YiVar -> EditorM a -> IO a
 - data KeymapSet = KeymapSet {}
 - extractTopKeymap :: KeymapSet -> Keymap
 - newtype BufferM a = BufferM {
- fromBufferM :: RWS Window [Update] FBuffer a
 
 - data IndentSettings = IndentSettings {
- expandTabs :: Bool
 - tabSize :: Int
 - shiftWidth :: Int
 
 - data FBuffer = forall syntax . FBuffer {
- bmode :: !(Mode syntax)
 - rawbuf :: !(BufferImpl syntax)
 - attributes :: !Attributes
 
 - type WinMarks = MarkSet Mark
 - data MarkSet a = MarkSet {}
 - data Attributes = Attributes {
- ident :: !BufferId
 - bkey__ :: !BufferRef
 - undos :: !URList
 - bufferDynamic :: !DynamicState
 - preferCol :: !(Maybe Int)
 - pendingUpdates :: ![UIUpdate]
 - selectionStyle :: !SelectionStyle
 - keymapProcess :: !KeymapProcess
 - winMarks :: !(Map WindowRef WinMarks)
 - lastActiveWindow :: !Window
 - lastSyncTime :: !UTCTime
 - readOnly :: !Bool
 - inserting :: !Bool
 - directoryContent :: !Bool
 - pointFollowsWindow :: !(WindowRef -> Bool)
 - updateTransactionInFlight :: !Bool
 - updateTransactionAccum :: ![Update]
 - fontsizeVariation :: !Int
 
 - data BufferId
 - data SelectionStyle = SelectionStyle {}
 - data AnyMode = forall syntax . AnyMode (Mode syntax)
 - data Mode syntax = Mode {
- modeName :: Text
 - modeApplies :: FilePath -> YiString -> Bool
 - modeHL :: ExtHL syntax
 - modePrettify :: syntax -> BufferM ()
 - modeKeymap :: KeymapSet -> KeymapSet
 - modeIndent :: syntax -> IndentBehaviour -> BufferM ()
 - modeAdjustBlock :: syntax -> Int -> BufferM ()
 - modeFollow :: syntax -> Action
 - modeIndentSettings :: IndentSettings
 - modeToggleCommentSelection :: Maybe (BufferM ())
 - modeGetStrokes :: syntax -> Point -> Point -> Point -> [Stroke]
 - modeOnLoad :: BufferM ()
 - modeModeLine :: [Text] -> BufferM Text
 - modeGotoDeclaration :: BufferM ()
 
 - data IndentBehaviour
 - type Status = ([Text], StyleName)
 - type Statuses = DelayList Status
 - data Editor = Editor {
- bufferStack :: !(NonEmpty BufferRef)
 - buffers :: !(Map BufferRef FBuffer)
 - refSupply :: !Int
 - tabs_ :: !(PointedList Tab)
 - dynamic :: !DynamicState
 - statusLines :: !Statuses
 - maxStatusHeight :: !Int
 - killring :: !Killring
 - currentRegex :: !(Maybe SearchExp)
 - searchDirection :: !Direction
 - pendingEvents :: ![Event]
 - onCloseActions :: !(Map BufferRef (EditorM ()))
 
 - newtype EditorM a = EditorM {
- fromEditorM :: ReaderT Config (State Editor) a
 
 - class (Monad m, MonadState Editor m) => MonadEditor m where
- askCfg :: m Config
 - withEditor :: EditorM a -> m a
 - withEditor_ :: EditorM a -> m ()
 
 - runEditor :: Config -> EditorM a -> Editor -> (Editor, a)
 - data UIConfig = UIConfig {
- configVty :: Config
 - configFontName :: Maybe String
 - configFontSize :: Maybe Int
 - configScrollStyle :: Maybe ScrollStyle
 - configScrollWheelAmount :: Int
 - configLeftSideScrollBar :: Bool
 - configAutoHideScrollBar :: Bool
 - configAutoHideTabBar :: Bool
 - configLineWrap :: Bool
 - configCursorStyle :: CursorStyle
 - configWindowFill :: Char
 - configTheme :: Theme
 
 - type UIBoot = Config -> ([Event] -> IO ()) -> ([Action] -> IO ()) -> Editor -> IO (UI Editor)
 - data CursorStyle
 - data Config = Config {
- startFrontEnd :: UIBoot
 - configUI :: UIConfig
 - startActions :: [Action]
 - initialActions :: [Action]
 - defaultKm :: KeymapSet
 - configInputPreprocess :: P Event Event
 - modeTable :: [AnyMode]
 - debugMode :: Bool
 - configRegionStyle :: RegionStyle
 - configKillringAccumulate :: Bool
 - configCheckExternalChangesObsessively :: Bool
 - bufferUpdateHandler :: [[Update] -> BufferM ()]
 - layoutManagers :: [AnyLayoutManager]
 - configVars :: DynamicState
 
 - data RegionStyle
 
Documentation
class (Default a, Binary a, Typeable a) => YiVariable a Source
Instances
| YiVariable RegionStyle | |
| YiVariable ArticleDB | |
| YiVariable Histories | |
| YiVariable VimState | |
| YiVariable CabalBuffer | |
| YiVariable GhciProcessName | Setting this is a bit like '(setq haskell-program-name foo)' in
 emacs'   | 
| YiVariable DependentMarks | |
| YiVariable BufferMarks | 
class (Default a, Typeable a) => YiConfigVariable a Source
Instances
type KeymapEndo = Keymap -> Keymap Source
type KeymapProcess = P Event Action Source
Constructors
| Yi | |
Instances
Constructors
| YiVar | |
Fields  | |
The type of user-bindable functions TODO: doc how these are actually user-bindable are they?
Constructors
| KeymapSet | |
Fields 
  | |
The BufferM monad writes the updates performed.
Instances
| Monad BufferM | |
| Functor BufferM | |
| Applicative BufferM | |
| MonadReader Window BufferM | |
| MonadState FBuffer BufferM | |
| MonadWriter [Update] BufferM | |
| YiAction (BufferM x) x | |
| MkSnippetCmd (SnippetCmd a) a | |
| Typeable (* -> *) BufferM | 
data IndentSettings Source
Currently duplicates some of Vim's indent settings. Allowing a buffer to specify settings that are more dynamic, perhaps via closures, could be useful.
Constructors
| IndentSettings | |
Fields 
  | |
Instances
Constructors
| forall syntax . FBuffer | |
Fields 
  | |
data Attributes Source
Constructors
| Attributes | |
Fields 
  | |
Instances
Constructors
| MemBuffer Text | |
| FileBuffer FilePath | 
data SelectionStyle Source
Constructors
| SelectionStyle | |
Fields 
  | |
Instances
A Mode customizes the Yi interface for editing a particular data format. It specifies when the mode should be used and controls file-specific syntax highlighting and command input, among other things.
Constructors
| Mode | |
Fields 
  | |
data IndentBehaviour Source
Used to specify the behaviour of the automatic indent command.
Constructors
| IncreaseCycle | Increase the indentation to the next higher indentation hint. If we are currently at the highest level of indentation then cycle back to the lowest.  | 
| DecreaseCycle | Decrease the indentation to the next smaller indentation hint. If we are currently at the smallest level then cycle back to the largest  | 
| IncreaseOnly | Increase the indentation to the next higher hint if no such hint exists do nothing.  | 
| DecreaseOnly | Decrease the indentation to the next smaller indentation hint, if no such hint exists do nothing.  | 
Instances
The Editor state
Constructors
| Editor | |
Fields 
  | |
Instances
Instances
class (Monad m, MonadState Editor m) => MonadEditor m where Source
Minimal complete definition
Instances
Constructors
| UIConfig | |
Fields 
  | |
type UIBoot = Config -> ([Event] -> IO ()) -> ([Action] -> IO ()) -> Editor -> IO (UI Editor) Source
data CursorStyle Source
When should we use a "fat" cursor (i.e. 2 pixels wide, rather than 1)? Fat cursors have only been implemented for the Pango frontend.
Constructors
| AlwaysFat | |
| NeverFat | |
| FatWhenFocused | |
| FatWhenFocusedAndInserting | 
Configuration record. All Yi hooks can be set here.
Constructors
| Config | |
Fields 
  | |
Instances
data RegionStyle Source