License | GPL-2 |
---|---|
Maintainer | yi-devel@googlegroups.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Extensions | Cpp |
This module defines buffer operation on regions
- module Yi.Region
- swapRegionsB :: Region -> Region -> BufferM ()
- deleteRegionB :: Region -> BufferM ()
- replaceRegionB :: Region -> YiString -> BufferM ()
- readRegionB :: Region -> BufferM YiString
- mapRegionB :: Region -> (Char -> Char) -> BufferM ()
- modifyRegionB :: (YiString -> YiString) -> Region -> BufferM ()
- winRegionB :: BufferM Region
- inclusiveRegionB :: Region -> BufferM Region
- blockifyRegion :: Region -> BufferM [Region]
- joinLinesB :: Region -> BufferM ()
- concatLinesB :: Region -> BufferM ()
- linesOfRegionB :: Region -> BufferM [Region]
Documentation
module Yi.Region
deleteRegionB :: Region -> BufferM () Source #
Delete an arbitrary part of the buffer
mapRegionB :: Region -> (Char -> Char) -> BufferM () Source #
Map the given function over the characters in the region.
Modifies the given region according to the given string transformation function
inclusiveRegionB :: Region -> BufferM Region Source #
Extend the right bound of a region to include it.
blockifyRegion :: Region -> BufferM [Region] Source #
See a region as a block/rectangular region, since regions are represented by two point, this returns a list of small regions form this block region.
joinLinesB :: Region -> BufferM () Source #
Joins lines in the region with a single space, skipping any empty lines.
concatLinesB :: Region -> BufferM () Source #
Concatenates lines in the region preserving the trailing newline if any.
linesOfRegionB :: Region -> BufferM [Region] Source #
Gets the lines of a region (as a region), preserving newlines. Thus the resulting list of regions is a partition of the original region.
The direction of the region is preserved and all smaller regions will retain that direction.
Note that regions should never be empty, so it would be odd for this to return an empty list...