yi-0.11.0: The Haskell-Scriptable Editor

Portabilityportable
Stabilityexperimental
Maintaineryi-devel@googlegroups.com
Safe HaskellNone

Yi.Buffer.Region

Description

This module defines buffer operation on regions

Synopsis

Documentation

module Yi.Region

swapRegionsB :: Region -> Region -> BufferM ()Source

Swap the content of two Regions

deleteRegionB :: Region -> BufferM ()Source

Delete an arbitrary part of the buffer

replaceRegionB :: Region -> YiString -> BufferM ()Source

Replace a region with a given rope.

mapRegionB :: Region -> (Char -> Char) -> BufferM ()Source

Map the given function over the characters in the region.

modifyRegionBSource

Arguments

:: (YiString -> YiString)

The string modification function

-> Region

The region to modify

-> BufferM () 

Modifies the given region according to the given string transformation function

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.

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.