Portability | portable |
---|---|
Stability | experimental |
Maintainer | yi-devel@googlegroups.com |
Safe Haskell | None |
High level operations on buffers.
- atEof :: BufferM Bool
- atEol :: BufferM Bool
- atLastLine :: BufferM Bool
- atSol :: BufferM Bool
- bdeleteB :: BufferM ()
- bdeleteLineB :: BufferM ()
- bkillWordB :: BufferM ()
- botB :: BufferM ()
- bufInfoB :: BufferM BufferFileInfo
- data BufferFileInfo = BufferFileInfo {
- bufInfoFileName :: FilePath
- bufInfoSize :: Int
- bufInfoLineNo :: Int
- bufInfoColNo :: Int
- bufInfoCharNo :: Point
- bufInfoPercent :: Text
- bufInfoModified :: Bool
- capitaliseWordB :: BufferM ()
- deleteBlankLinesB :: BufferM ()
- deleteHorizontalSpaceB :: Maybe Int -> BufferM ()
- deleteRegionWithStyleB :: Region -> RegionStyle -> BufferM Point
- deleteToEol :: BufferM ()
- deleteTrailingSpaceB :: BufferM ()
- downFromTosB :: Int -> BufferM ()
- downScreenB :: BufferM ()
- downScreensB :: Int -> BufferM ()
- exchangePointAndMarkB :: BufferM ()
- fillParagraph :: BufferM ()
- findMatchingPairB :: BufferM ()
- firstNonSpaceB :: BufferM ()
- flipRectangleB :: Point -> Point -> BufferM (Point, Point)
- getBookmarkB :: String -> BufferM Mark
- getLineAndCol :: BufferM (Int, Int)
- getLineAndColOfPoint :: Point -> BufferM (Int, Int)
- getNextLineB :: Direction -> BufferM YiString
- getNextNonBlankLineB :: Direction -> BufferM YiString
- getRawestSelectRegionB :: BufferM Region
- getSelectionMarkPointB :: BufferM Point
- getSelectRegionB :: BufferM Region
- gotoCharacterB :: Char -> Direction -> RegionStyle -> Bool -> BufferM ()
- hasWhiteSpaceBefore :: BufferM Bool
- incrementNextNumberByB :: Int -> BufferM ()
- insertRopeWithStyleB :: YiString -> RegionStyle -> BufferM ()
- isCurrentLineAllWhiteSpaceB :: BufferM Bool
- isCurrentLineEmptyB :: BufferM Bool
- isNumberB :: BufferM Bool
- killWordB :: BufferM ()
- lastNonSpaceB :: BufferM ()
- leftEdgesOfRegionB :: RegionStyle -> Region -> BufferM [Point]
- leftOnEol :: BufferM ()
- linePrefixSelectionB :: YiString -> BufferM ()
- lineStreamB :: Direction -> BufferM [YiString]
- lowercaseWordB :: BufferM ()
- middleB :: BufferM ()
- modifyExtendedSelectionB :: TextUnit -> (YiString -> YiString) -> BufferM ()
- moveNonspaceOrSol :: BufferM ()
- movePercentageFileB :: Int -> BufferM ()
- moveToEol :: BufferM ()
- moveToSol :: BufferM ()
- moveXorEol :: Int -> BufferM ()
- moveXorSol :: Int -> BufferM ()
- nextCInLineExc :: Char -> BufferM ()
- nextCInLineInc :: Char -> BufferM ()
- nextNParagraphs :: Int -> BufferM ()
- nextWordB :: BufferM ()
- prevCInLineExc :: Char -> BufferM ()
- prevCInLineInc :: Char -> BufferM ()
- prevNParagraphs :: Int -> BufferM ()
- prevWordB :: BufferM ()
- readCurrentWordB :: BufferM YiString
- readLnB :: BufferM YiString
- readPrevWordB :: BufferM YiString
- readRegionRopeWithStyleB :: Region -> RegionStyle -> BufferM YiString
- replaceBufferContent :: YiString -> BufferM ()
- revertB :: YiString -> Maybe ConverterName -> UTCTime -> BufferM ()
- rightEdgesOfRegionB :: RegionStyle -> Region -> BufferM [Point]
- scrollB :: Int -> BufferM ()
- scrollCursorToBottomB :: BufferM ()
- scrollCursorToTopB :: BufferM ()
- scrollScreensB :: Int -> BufferM ()
- scrollToCursorB :: BufferM ()
- scrollToLineAboveWindowB :: BufferM ()
- scrollToLineBelowWindowB :: BufferM ()
- setSelectionMarkPointB :: Point -> BufferM ()
- setSelectRegionB :: Region -> BufferM ()
- shapeOfBlockRegionB :: Region -> BufferM (Point, [Int])
- sortLines :: BufferM ()
- snapInsB :: BufferM ()
- snapScreenB :: Maybe ScrollStyle -> BufferM Bool
- splitBlockRegionToContiguousSubRegionsB :: Region -> BufferM [Region]
- swapB :: BufferM ()
- switchCaseChar :: Char -> Char
- test3CharB :: BufferM Bool
- testHexB :: BufferM Bool
- toggleCommentB :: YiString -> BufferM ()
- topB :: BufferM ()
- unLineCommentSelectionB :: YiString -> YiString -> BufferM ()
- upFromBosB :: Int -> BufferM ()
- uppercaseWordB :: BufferM ()
- upScreenB :: BufferM ()
- upScreensB :: Int -> BufferM ()
- vimScrollB :: Int -> BufferM ()
- vimScrollByB :: (Int -> Int) -> Int -> BufferM ()
Documentation
atLastLine :: BufferM BoolSource
True if point at the last line
bdeleteLineB :: BufferM ()Source
Delete backward to the sof or the new line character
bkillWordB :: BufferM ()Source
Delete backward whitespace or non-whitespace depending on the character before point.
bufInfoB :: BufferM BufferFileInfoSource
File info, size in chars, line no, col num, char num, percent
data BufferFileInfo Source
BufferFileInfo | |
|
capitaliseWordB :: BufferM ()Source
capitalise the first letter of this word
deleteHorizontalSpaceB :: Maybe Int -> BufferM ()Source
emacs' delete-horizontal-space
with the optional argument.
deleteToEol :: BufferM ()Source
Delete to the end of line, excluding it.
deleteTrailingSpaceB :: BufferM ()Source
Delete trailing whitespace from all lines. Uses savingPositionB
to get back to where it was.
downFromTosB :: Int -> BufferM ()Source
Move to n
lines down from top of screen
downScreenB :: BufferM ()Source
Scroll down 1 screen
downScreensB :: Int -> BufferM ()Source
exchangePointAndMarkB :: BufferM ()Source
Exchange point & mark.
fillParagraph :: BufferM ()Source
firstNonSpaceB :: BufferM ()Source
Move to first non-space character in this line
getBookmarkB :: String -> BufferM MarkSource
getLineAndCol :: BufferM (Int, Int)Source
Get the current line and column number
getLineAndColOfPoint :: Point -> BufferM (Int, Int)Source
getNextLineB :: Direction -> BufferM YiStringSource
The same as getMaybeNextLineB
but avoids the use of the Maybe
type in the return by returning the empty string if there is no
next line.
getNextNonBlankLineB :: Direction -> BufferM YiStringSource
Returns the closest line to the current line which is non-blank, in the given direction. Returns the empty string if there is no such line (for example if we are on the top line already).
getRawestSelectRegionB :: BufferM RegionSource
Return the region between point and mark
getSelectionMarkPointB :: BufferM PointSource
Get the current buffer selection mark
getSelectRegionB :: BufferM RegionSource
Get the current region boundaries. Extended to the current selection unit.
gotoCharacterB :: Char -> Direction -> RegionStyle -> Bool -> BufferM ()Source
hasWhiteSpaceBefore :: BufferM BoolSource
incrementNextNumberByB :: Int -> BufferM ()Source
Increase (or decrease if negative) next number on line by n.
insertRopeWithStyleB :: YiString -> RegionStyle -> BufferM ()Source
isCurrentLineAllWhiteSpaceB :: BufferM BoolSource
Note: Returns False if line doesn't have any characters besides a newline
isCurrentLineEmptyB :: BufferM BoolSource
True if current line consists of just a newline (no whitespace)
Delete forward whitespace or non-whitespace depending on the character under point.
lastNonSpaceB :: BufferM ()Source
Move to the last non-space character in this line
leftEdgesOfRegionB :: RegionStyle -> Region -> BufferM [Point]Source
Prefix each line in the selection using the given string.
lineStreamB :: Direction -> BufferM [YiString]Source
Get a (lazy) stream of lines in the buffer, starting at the next line in the given direction.
lowercaseWordB :: BufferM ()Source
lowerise word under the cursor
moveNonspaceOrSol :: BufferM ()Source
Go to the first non space character in the line; if already there, then go to the beginning of the line.
movePercentageFileB :: Int -> BufferM ()Source
moveXorEol :: Int -> BufferM ()Source
Move x
chars forward, or to the eol, whichever is less
moveXorSol :: Int -> BufferM ()Source
Move x
chars back, or to the sol, whichever is less
nextCInLineExc :: Char -> BufferM ()Source
nextCInLineInc :: Char -> BufferM ()Source
nextNParagraphs :: Int -> BufferM ()Source
Move down next n
paragraphs
prevCInLineExc :: Char -> BufferM ()Source
prevCInLineInc :: Char -> BufferM ()Source
prevNParagraphs :: Int -> BufferM ()Source
Move up prev n
paragraphs
readCurrentWordB :: BufferM YiStringSource
Reads in word at point.
readPrevWordB :: BufferM YiStringSource
Reads in word before point.
replaceBufferContent :: YiString -> BufferM ()Source
Replace the contents of the buffer with some string
revertB :: YiString -> Maybe ConverterName -> UTCTime -> BufferM ()Source
Helper function: revert the buffer contents to its on-disk version
rightEdgesOfRegionB :: RegionStyle -> Region -> BufferM [Point]Source
scrollCursorToBottomB :: BufferM ()Source
Move cursor to the bottom of the screen
scrollCursorToTopB :: BufferM ()Source
Move cursor to the top of the screen
scrollScreensB :: Int -> BufferM ()Source
Scroll by n screens (negative for up)
scrollToCursorB :: BufferM ()Source
Move to middle line in screen
setSelectionMarkPointB :: Point -> BufferM ()Source
Marks
Set the current buffer selection mark
setSelectRegionB :: Region -> BufferM ()Source
Select the given region: set the selection mark at the regionStart
and the current point at the regionEnd
.
shapeOfBlockRegionB :: Region -> BufferM (Point, [Int])Source
snapScreenB :: Maybe ScrollStyle -> BufferM BoolSource
Move the visible region to include the point
switchCaseChar :: Char -> CharSource
test3CharB :: BufferM BoolSource
Used by isNumber to test if current character under cursor is a number.
testHexB :: BufferM BoolSource
Characters ['a'..'f'] are part of a hex number only if preceded by 0x. Test if the current occurence of ['a'..'f'] is part of a hex number.
toggleCommentB :: YiString -> BufferM ()Source
Just like toggleCommentSelectionB
but automatically inserts a
whitespace suffix to the inserted comment string. In fact:
:: YiString | The string which begins a line comment |
-> YiString | A potentially shorter string that begins a comment |
-> BufferM () |
Uncomments the selection using the given line comment starting string. This only works for the comments which begin at the start of the line.
upFromBosB :: Int -> BufferM ()Source
Move to n
lines up from the bottom of the screen
uppercaseWordB :: BufferM ()Source
capitalise the word under the cursor
upScreensB :: Int -> BufferM ()Source
vimScrollB :: Int -> BufferM ()Source
Same as scrollB, but also moves the cursor
vimScrollByB :: (Int -> Int) -> Int -> BufferM ()Source
Same as scrollByB, but also moves the cursor