Safe Haskell | None |
---|---|
Language | Haskell2010 |
- cursors :: Action ()
- delete :: BufAction ()
- insertText :: YiString -> BufAction ()
- findNext :: YiString -> BufAction ()
- findNextFrom :: YiString -> Coord -> BufAction Coord
- findPrev :: YiString -> BufAction ()
- findPrevFrom :: YiString -> Coord -> BufAction Coord
- eachRange :: HasBuffer s => Traversal' s Range
- addRange :: Range -> BufAction ()
- ranges :: HasBuffer s => Lens' s [Range]
- rangeDo :: (Range -> BufAction a) -> BufAction [a]
- rangeDo_ :: (Range -> BufAction a) -> BufAction ()
- overRanges :: (Range -> BufAction Range) -> BufAction ()
- moveRangesByN :: Int -> BufAction ()
- moveRangesByC :: Coord -> BufAction ()
Main
Registers hooks for the extension. The user should add this to their config.
Actions
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.
findPrev :: YiString -> BufAction () Source #
Move all ranges to the location of the previous occurence of the given text.
Working with Cursor Ranges
eachRange :: HasBuffer s => Traversal' s Range Source #
A Traversal over each Range for the given buffer.
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
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