This module defines buffer operation on regions
- module Yi.Region
- swapRegionsB :: Region -> Region -> BufferM ()
- deleteRegionB :: Region -> BufferM ()
- replaceRegionB :: Region -> String -> BufferM ()
- replaceRegionClever :: Region -> String -> BufferM ()
- readRegionB :: Region -> BufferM String
- mapRegionB :: Region -> (Char -> Char) -> BufferM ()
- modifyRegionB :: (String -> String) -> Region -> BufferM ()
- modifyRegionClever :: (String -> String) -> Region -> BufferM ()
- winRegionB :: BufferM Region
- inclusiveRegionB :: Region -> BufferM Region
- blockifyRegion :: Region -> BufferM [Region]
Documentation
module Yi.Region
deleteRegionB :: Region -> BufferM ()Source
Delete an arbitrary part of the buffer
replaceRegionClever :: Region -> String -> BufferM ()Source
As replaceRegionB
, but do a minimal edition instead of deleting the whole
region and inserting it back.
readRegionB :: Region -> BufferM StringSource
Read an arbitrary part of the buffer
Modifies the given region according to the given string transformation function
modifyRegionClever :: (String -> String) -> Region -> BufferM ()Source
As modifyRegionB
, but do a minimal edition instead of deleting the whole
region and inserting it back.
inclusiveRegionB :: Region -> BufferM RegionSource
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.