yi-0.6.2.3: The Haskell-Scriptable EditorSource codeContentsIndex
Yi.Buffer.HighLevel
Contents
Char-based movement actions.
Synopsis
moveToSol :: BufferM ()
moveToEol :: BufferM ()
topB :: BufferM ()
botB :: BufferM ()
leftOnEol :: BufferM ()
moveXorSol :: Int -> BufferM ()
moveXorEol :: Int -> BufferM ()
nextWordB :: BufferM ()
prevWordB :: BufferM ()
nextCInc :: Char -> BufferM ()
nextCExc :: Char -> BufferM ()
prevCInc :: Char -> BufferM ()
prevCExc :: Char -> BufferM ()
firstNonSpaceB :: BufferM ()
lastNonSpaceB :: BufferM ()
moveNonspaceOrSol :: BufferM ()
nextNParagraphs :: Int -> BufferM ()
prevNParagraphs :: Int -> BufferM ()
goUnmatchedB :: Direction -> Char -> Char -> BufferM ()
atSol :: BufferM Bool
atEol :: BufferM Bool
atSof :: BufferM Bool
atEof :: BufferM Bool
getLineAndCol :: BufferM (Int, Int)
readLnB :: BufferM String
readCharB :: BufferM (Maybe Char)
readRestOfLnB :: BufferM String
readPreviousOfLnB :: BufferM String
hasWhiteSpaceBefore :: BufferM Bool
prevPointB :: BufferM Point
nextPointB :: BufferM Point
readPrevWordB :: BufferM String
bdeleteB :: BufferM ()
killWordB :: BufferM ()
bkillWordB :: BufferM ()
uppercaseWordB :: BufferM ()
lowercaseWordB :: BufferM ()
capitaliseWordB :: BufferM ()
deleteToEol :: BufferM ()
deleteLineForward :: BufferM ()
swapB :: BufferM ()
deleteTrailingSpaceB :: BufferM ()
setSelectionMarkPointB :: Point -> BufferM ()
getSelectionMarkPointB :: BufferM Point
exchangePointAndMarkB :: BufferM ()
getBookmarkB :: String -> BufferM Mark
data BufferFileInfo = BufferFileInfo {
bufInfoFileName :: FilePath
bufInfoSize :: Int
bufInfoLineNo :: Int
bufInfoColNo :: Int
bufInfoCharNo :: Point
bufInfoPercent :: String
bufInfoModified :: Bool
}
bufInfoB :: BufferM BufferFileInfo
upScreensB :: Int -> BufferM ()
downScreensB :: Int -> BufferM ()
upScreenB :: BufferM ()
downScreenB :: BufferM ()
scrollScreensB :: Int -> BufferM ()
scrollByB :: (Int -> Int) -> Int -> BufferM ()
vimScrollB :: Int -> BufferM ()
vimScrollByB :: (Int -> Int) -> Int -> BufferM ()
scrollToCursorB :: BufferM ()
scrollCursorToTopB :: BufferM ()
scrollCursorToBottomB :: BufferM ()
scrollB :: Int -> BufferM ()
snapInsB :: BufferM ()
indexOfSolAbove :: Int -> BufferM Point
snapScreenB :: BufferM Bool
downFromTosB :: Int -> BufferM ()
upFromBosB :: Int -> BufferM ()
middleB :: BufferM ()
pointInWindowB :: Point -> BufferM Bool
getRawestSelectRegionB :: BufferM Region
getRawSelectRegionB :: BufferM Region
getSelectRegionB :: BufferM Region
setSelectRegionB :: Region -> BufferM ()
extendSelectRegionB :: Region -> BufferM ()
deleteBlankLinesB :: BufferM ()
lineStreamB :: Direction -> BufferM [String]
getMaybeNextLineB :: Direction -> BufferM (Maybe String)
getNextLineB :: Direction -> BufferM String
getNextLineWhichB :: Direction -> (String -> Bool) -> BufferM (Maybe String)
getNextNonBlankLineB :: Direction -> BufferM String
modifySelectionB :: (String -> String) -> BufferM ()
modifyExtendedSelectionB :: TextUnit -> (String -> String) -> BufferM ()
linePrefixSelectionB :: String -> BufferM ()
unLineCommentSelectionB :: String -> String -> BufferM ()
toggleCommentSelectionB :: String -> String -> BufferM ()
justifySelectionWithTopB :: BufferM ()
replaceBufferContent :: String -> BufferM ()
fillRegion :: Region -> BufferM ()
fillParagraph :: BufferM ()
sortLines :: BufferM ()
revertB :: String -> UTCTime -> BufferM ()
Documentation
moveToSol :: BufferM ()Source
Move point to start of line
moveToEol :: BufferM ()Source
Move point to end of line
topB :: BufferM ()Source
Move cursor to origin
botB :: BufferM ()Source
Move cursor to end of buffer
leftOnEol :: BufferM ()Source
Move left if on eol, but not on blank line
moveXorSol :: Int -> BufferM ()Source
Move x chars back, or to the sol, whichever is less
moveXorEol :: Int -> BufferM ()Source
Move x chars forward, or to the eol, whichever is less
nextWordB :: BufferM ()Source
Move to first char of next word forwards
prevWordB :: BufferM ()Source
Move to first char of next word backwards
Char-based movement actions.
nextCInc :: Char -> BufferM ()Source
Move to the next occurence of c
nextCExc :: Char -> BufferM ()Source
Move to the character before the next occurence of c
prevCInc :: Char -> BufferM ()Source
Move to the previous occurence of c
prevCExc :: Char -> BufferM ()Source
Move to the character after the previous occurence of c
firstNonSpaceB :: BufferM ()Source
Move to first non-space character in this line
lastNonSpaceB :: BufferM ()Source
Move to the last non-space character in this line
moveNonspaceOrSol :: BufferM ()Source
Go to the first non space character in the line; if already there, then go to the beginning of the line.
nextNParagraphs :: Int -> BufferM ()Source
Move down next n paragraphs
prevNParagraphs :: Int -> BufferM ()Source
Move up prev n paragraphs
goUnmatchedB :: Direction -> Char -> Char -> BufferM ()Source
atSol :: BufferM BoolSource
Return true if the current point is the start of a line
atEol :: BufferM BoolSource
Return true if the current point is the end of a line
atSof :: BufferM BoolSource
True if point at start of file
atEof :: BufferM BoolSource
True if point at end of file
getLineAndCol :: BufferM (Int, Int)Source
Get the current line and column number
readLnB :: BufferM StringSource
Read the line the point is on
readCharB :: BufferM (Maybe Char)Source
readRestOfLnB :: BufferM StringSource
Read from point to end of line
readPreviousOfLnB :: BufferM StringSource
Read from point to beginning of line
hasWhiteSpaceBefore :: BufferM BoolSource
prevPointB :: BufferM PointSource
Get the previous point, unless at the beginning of the file
nextPointB :: BufferM PointSource
Get the next point, unless at the end of the file
readPrevWordB :: BufferM StringSource
bdeleteB :: BufferM ()Source
Delete one character backward
killWordB :: BufferM ()Source
Delete forward whitespace or non-whitespace depending on the character under point.
bkillWordB :: BufferM ()Source
Delete backward whitespace or non-whitespace depending on the character before point.
uppercaseWordB :: BufferM ()Source
capitalise the word under the cursor
lowercaseWordB :: BufferM ()Source
lowerise word under the cursor
capitaliseWordB :: BufferM ()Source
capitalise the first letter of this word
deleteToEol :: BufferM ()Source
Delete to the end of line, excluding it.
deleteLineForward :: BufferM ()Source
Delete whole line moving to the next line
swapB :: BufferM ()Source
Transpose two characters, (the Emacs C-t action)
deleteTrailingSpaceB :: BufferM ()Source
Delete trailing whitespace from all lines
setSelectionMarkPointB :: Point -> BufferM ()Source

Marks

Set the current buffer selection mark

getSelectionMarkPointB :: BufferM PointSource
Get the current buffer selection mark
exchangePointAndMarkB :: BufferM ()Source
Exchange point & mark.
getBookmarkB :: String -> BufferM MarkSource
data BufferFileInfo Source
Constructors
BufferFileInfo
bufInfoFileName :: FilePath
bufInfoSize :: Int
bufInfoLineNo :: Int
bufInfoColNo :: Int
bufInfoCharNo :: Point
bufInfoPercent :: String
bufInfoModified :: Bool
bufInfoB :: BufferM BufferFileInfoSource
File info, size in chars, line no, col num, char num, percent
upScreensB :: Int -> BufferM ()Source
downScreensB :: Int -> BufferM ()Source
upScreenB :: BufferM ()Source
Scroll up 1 screen
downScreenB :: BufferM ()Source
Scroll down 1 screen
scrollScreensB :: Int -> BufferM ()Source
Scroll by n screens (negative for up)
scrollByB :: (Int -> Int) -> Int -> BufferM ()Source
Scroll according to function passed. The function takes the | Window height in lines, its result is passed to scrollB | (negative for up)
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
scrollToCursorB :: BufferM ()Source
Move to middle line in screen
scrollCursorToTopB :: BufferM ()Source
Move cursor to the top of the screen
scrollCursorToBottomB :: BufferM ()Source
Move cursor to the bottom of the screen
scrollB :: Int -> BufferM ()Source
Scroll by n lines.
snapInsB :: BufferM ()Source
Move the point to inside the viewable region
indexOfSolAbove :: Int -> BufferM PointSource
return index of Sol on line n above current line
snapScreenB :: BufferM BoolSource
Move the visible region to include the point
downFromTosB :: Int -> BufferM ()Source
Move to n lines down from top of screen
upFromBosB :: Int -> BufferM ()Source
Move to n lines up from the bottom of the screen
middleB :: BufferM ()Source
Move to middle line in screen
pointInWindowB :: Point -> BufferM BoolSource
getRawestSelectRegionB :: BufferM RegionSource
Return the region between point and mark
getRawSelectRegionB :: BufferM RegionSource
Return the empty region if the selection is not visible.
getSelectRegionB :: BufferM RegionSource
Get the current region boundaries. Extended to the current selection unit.
setSelectRegionB :: Region -> BufferM ()Source
Select the given region: set the selection mark at the regionStart and the current point at the regionEnd.
extendSelectRegionB :: Region -> BufferM ()Source
Extend the selection mark using the given region.
deleteBlankLinesB :: BufferM ()Source
lineStreamB :: Direction -> BufferM [String]Source
Get a (lazy) stream of lines in the buffer, starting at the next line in the given direction.
getMaybeNextLineB :: Direction -> BufferM (Maybe String)Source
getNextLineB :: Direction -> BufferM StringSource
getNextLineWhichB :: Direction -> (String -> Bool) -> BufferM (Maybe String)Source
getNextNonBlankLineB :: Direction -> BufferM StringSource
modifySelectionB :: (String -> String) -> BufferM ()Source
Uses a string modifying function to modify the current selection Currently unsets the mark such that we have no selection, arguably we could instead work out where the new positions should be and move the mark and point accordingly.
modifyExtendedSelectionB :: TextUnit -> (String -> String) -> BufferM ()Source
linePrefixSelectionBSource
:: StringThe string that starts a line comment
-> BufferM ()
Prefix each line in the selection using the given string.
unLineCommentSelectionBSource
:: StringThe string which begins a line comment
-> StringA 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.
toggleCommentSelectionB :: String -> String -> BufferM ()Source
Toggle line comments in the selection by adding or removing a prefix to each line.
justifySelectionWithTopB :: BufferM ()Source
Justifies all the lines of the selection to be the same as the top line. NOTE: if the selection begins part way along a line, the other lines will be justified only with respect to the part of the indentation which is selected.
replaceBufferContent :: String -> BufferM ()Source
Replace the contents of the buffer with some string
fillRegion :: Region -> BufferM ()Source
Fill the text in the region so it fits nicely 80 columns.
fillParagraph :: BufferM ()Source
sortLines :: BufferM ()Source
Sort the lines of the region.
revertB :: String -> UTCTime -> BufferM ()Source
Helper function: revert the buffer contents to its on-disk version
Produced by Haddock version 2.6.1