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

Safe HaskellNone
LanguageHaskell2010

Rasa.Ext.Cursors

Contents

Synopsis

Main

cursors :: Action () Source #

Registers hooks 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

eachRange :: HasBuffer s => Traversal' s Range Source #

A Traversal over each Range for the given buffer.

addRange :: Range -> BufAction () Source #

Adds a new range to the list of ranges.

ranges :: HasBuffer s => Lens' s [Range] Source #

A lens over all the stored cursor ranges for a buffer

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

Sequences actions over each range as a BufAction

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

rangeDo with void return.

overRanges :: (Range -> BufAction Range) -> BufAction () Source #

Sequences actions over each range and replaces each range with its result.

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