yi-keymap-vim-0.19.0: Vim keymap for Yi editor

License | GPL-2
Maintainer | yi-devel@googlegroups.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Yi.Keymap.Vim.StyledRegion

Description

I'm a module waiting for some kind soul to give me a commentary!

Synopsis

- data StyledRegion = StyledRegion !RegionStyle !Region
- normalizeRegion :: StyledRegion -> BufferM StyledRegion
- transformCharactersInRegionB :: StyledRegion -> (Char -> Char) -> BufferM ()
- transformCharactersInLineN :: Int -> (Char -> Char) -> BufferM ()

# Documentation

data StyledRegion Source #

Constructors

StyledRegion !RegionStyle !Region |

normalizeRegion :: StyledRegion -> BufferM StyledRegion Source #

from vim help:

1. If the motion is exclusive and the end of the motion is in column 1, the end of the motion is moved to the end of the previous line and the motion becomes inclusive. Example: "}" moves to the first line after a paragraph, but "d}" will not include that line.
2. If the motion is exclusive, the end of the motion is in column 1 and the start of the motion was at or before the first non-blank in the line, the motion becomes linewise. Example: If a paragraph begins with some blanks and you do "d}" while standing on the first non-blank, all the lines of the paragraph are deleted, including the blanks. If you do a put now, the deleted lines will be inserted below the cursor position.

TODO: case 2

transformCharactersInRegionB :: StyledRegion -> (Char -> Char) -> BufferM () Source #

transformCharactersInLineN :: Int -> (Char -> Char) -> BufferM () Source #