rasa-0.1.1: A modular text editor

Safe HaskellNone
LanguageHaskell2010

Rasa.Internal.Directive

Contents

Synopsis

Performing Actions on Buffers

bufDo :: Monoid a => BufAction a -> Action a Source #

This lifts a BufAction to an Action which performs the BufAction on every buffer and collects the return values via mappend

focusDo :: BufAction a -> Action a Source #

This lifts a BufAction to an Action which performs the BufAction on the focused buffer.

Editor Actions

exit :: Action () Source #

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.

addBuffer :: Text -> Action () Source #

This adds a new buffer with the given text.

addBufferThen :: Text -> BufAction a -> Action a Source #

This adds a new buffer with the given text then performs the given BufAction agains that buffer.

nextBuf :: Action () Source #

Switches focus to the next buffer

prevBuf :: Action () Source #

Switches focus to the previous buffer

Buffer Actions

overRange :: Range -> (Text -> Text) -> BufAction () Source #

Runs the given function over the text in the range, replacing it with the results.

replaceRange :: Range -> Text -> 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.

insertAt :: Coord -> Text -> BufAction () Source #

Inserts text into the buffer at the given Coord.

sizeOf :: YiString -> Coord Source #

Returns the number of rows and columns that a chunk of text spans as a Coord