text-zipper-0.10: A text editor zipper library

Safe HaskellNone
LanguageHaskell2010

Data.Text.Zipper.Generic.Words

Description

Implements word movements.

Copyright (c) Hans-Peter Deifel

Synopsis

Documentation

moveWordLeft :: GenericTextZipper a => TextZipper a -> TextZipper a Source #

Move one word to the left.

A word is defined as a consecutive string not satisfying isSpace. This function always leaves the cursor at the beginning of a word (except at the very start of the text).

moveWordRight :: GenericTextZipper a => TextZipper a -> TextZipper a Source #

Move one word to the right.

A word is defined as a consecutive string not satisfying isSpace. This function always leaves the cursor at the end of a word (except at the very end of the text).

deletePrevWord :: (Eq a, GenericTextZipper a) => TextZipper a -> TextZipper a Source #

Delete the previous word.

Does the same as moveWordLeft but deletes characters instead of simply moving past them.

deleteWord :: GenericTextZipper a => TextZipper a -> TextZipper a Source #

Delete the next word.

Does the same as moveWordRight but deletes characters instead of simply moving past them.