rasa-ext-cursors-0.1.7: Rasa Ext adding cursor(s)

Safe HaskellNone
LanguageHaskell2010

Rasa.Ext.Cursors

Contents

Synopsis

Main

cursors :: App () Source #

Registers listeners for the extension. The user should add this to their config.

Actions

delete :: BufAction () Source #

Delete the text of all ranges in a buffer

insertText :: YiString -> BufAction () Source #

Insert text at the beginning of all ranges in the buffer.

findNext :: YiString -> BufAction () Source #

Move all ranges to the location of the next occurence of the given text.

findNextFrom :: YiString -> Coord -> BufAction Coord Source #

Get the Coord of the next occurence of the given text after the given Coord

findPrev :: YiString -> BufAction () Source #

Move all ranges to the location of the previous occurence of the given text.

findPrevFrom :: YiString -> Coord -> BufAction Coord Source #

Get the Coord of the previous occurence of the given text before the given Coord

Working with Cursor Ranges

addRange :: CrdRange -> BufAction () Source #

Adds a new range to the list of ranges.

getRanges :: BufAction [CrdRange] Source #

Get the list of ranges

rangeDo :: (CrdRange -> BufAction a) -> BufAction [a] Source #

Sequences actions over each range as a BufAction

rangeDo_ :: (CrdRange -> BufAction a) -> BufAction () Source #

rangeDo with void return.

moveRangesByN :: Int -> BufAction () Source #

Move all ranges by the given number of columns

moveRangesByC :: Coord -> BufAction () Source #

Move all ranges by the given number of rows and columns