Safe Haskell | None |
---|---|
Language | Haskell2010 |
- bufDo :: BufRef -> BufAction a -> Action (Maybe a)
- bufDo_ :: BufRef -> BufAction a -> Action ()
- buffersDo :: BufAction a -> Action [a]
- buffersDo_ :: BufAction a -> Action ()
- exit :: Action ()
- newBuffer :: YiString -> Action BufRef
- getBufRefs :: Action [BufRef]
- getBuffers :: Action [(BufRef, Buffer)]
- getBuffer :: BufRef -> Action (Maybe Buffer)
- nextBufRef :: BufRef -> Action BufRef
- prevBufRef :: BufRef -> Action BufRef
- overRange :: Range -> (YiString -> YiString) -> BufAction ()
- replaceRange :: Range -> YiString -> BufAction ()
- deleteRange :: Range -> BufAction ()
- insertAt :: Coord -> YiString -> BufAction ()
- sizeOf :: YiString -> Coord
Performing Actions on Buffers
buffersDo_ :: BufAction a -> Action () Source #
Editor Actions
This signals to the editor that you'd like to shutdown. The current events
will finish processing, then the onExit
hook will run,
then the editor will exit.
getBuffers :: Action [(BufRef, Buffer)] Source #
Returns an up-to-date list of all Buffer
s, returned values
are read-only; altering them has no effect on the actual stored buffers.
This function is useful for renderers.
getBuffer :: BufRef -> Action (Maybe Buffer) Source #
Returns the Buffer
for a BufRef if it still exists.
This is read-only; altering the buffer has no effect on the stored buffer.
This function is useful for renderers.
Buffer Actions
overRange :: Range -> (YiString -> YiString) -> BufAction () Source #
Runs the given function over the text in the range, replacing it with the results.
replaceRange :: Range -> YiString -> BufAction () Source #
Replaces the text in the given range from the buffer.
deleteRange :: Range -> BufAction () Source #
Deletes the text in the given range from the buffer.