-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Vim keymap for Yi editor -- -- Vim keymap for Yi editor @package yi-keymap-vim @version 0.14.0 module Yi.Keymap.Vim.Tag completeVimTag :: Text -> YiM [Text] -- | Opens the file that contains tag. Uses the global tag table -- or uses the first valid tag file in TagsFileList. gotoTag :: Tag -> Int -> Maybe (FilePath, Int, Int) -> YiM () -- | Goes to the next tag. (:tnext) nextTag :: YiM () -- | Return to location from before last tag jump. popTag :: YiM () -- | Go to next tag in the tag stack. Represents :tag without any specified -- tag. unpopTag :: YiM () instance GHC.Generics.Generic Yi.Keymap.Vim.Tag.VimTagStack instance Data.Default.Class.Default Yi.Keymap.Vim.Tag.VimTagStack instance Yi.Types.YiVariable Yi.Keymap.Vim.Tag.VimTagStack instance Data.Binary.Class.Binary Yi.Keymap.Vim.Tag.VimTagStack -- | I'm a module waiting for some kind soul to give me a commentary! module Yi.Keymap.Vim.StyledRegion data StyledRegion StyledRegion :: !RegionStyle -> !Region -> StyledRegion -- | 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. --
  3. 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.
  4. --
-- -- TODO: case 2 normalizeRegion :: StyledRegion -> BufferM StyledRegion transformCharactersInRegionB :: StyledRegion -> (Char -> Char) -> BufferM () transformCharactersInLineN :: Int -> (Char -> Char) -> BufferM () module Yi.Keymap.Vim.Search doVimSearch :: Maybe String -> [SearchOption] -> Direction -> EditorM () continueVimSearch :: (SearchExp, Direction) -> BufferM () module Yi.Keymap.Vim.MatchResult data MatchResult a NoMatch :: MatchResult a PartialMatch :: MatchResult a WholeMatch :: a -> MatchResult a matchFromBool :: Bool -> MatchResult () matchFromMaybe :: Maybe a -> MatchResult a instance GHC.Base.Functor Yi.Keymap.Vim.MatchResult.MatchResult instance GHC.Base.Applicative Yi.Keymap.Vim.MatchResult.MatchResult instance GHC.Base.Alternative Yi.Keymap.Vim.MatchResult.MatchResult instance GHC.Show.Show (Yi.Keymap.Vim.MatchResult.MatchResult a) module Yi.Keymap.Vim.TextObject data TextObject TextObject :: !RegionStyle -> !TextUnit -> TextObject data CountedTextObject CountedTextObject :: !Int -> !TextObject -> CountedTextObject regionOfTextObjectB :: CountedTextObject -> BufferM StyledRegion changeTextObjectCount :: Int -> CountedTextObject -> CountedTextObject changeTextObjectStyle :: (RegionStyle -> RegionStyle) -> TextObject -> TextObject stringToTextObject :: String -> MatchResult TextObject module Yi.Keymap.Vim.Digraph charFromDigraph :: [(String, Char)] -> Char -> Char -> Maybe Char defDigraphs :: [(String, Char)] -- | Common types used by the vim keymap. module Yi.Keymap.Vim.Common data VimMode Normal :: VimMode NormalOperatorPending :: OperatorName -> VimMode -- | char denotes how state got into insert mode (i, a, -- etc.) Insert :: Char -> VimMode Replace :: VimMode ReplaceSingleChar :: VimMode -- | after C-o InsertNormal :: VimMode -- | after C-o and one of v, V, C-v InsertVisual :: VimMode Visual :: RegionStyle -> VimMode Ex :: VimMode Search :: VimMode -> Direction -> VimMode [previousMode] :: VimMode -> VimMode [direction] :: VimMode -> Direction data VimBinding VimBindingY :: (EventString -> VimState -> MatchResult (YiM RepeatToken)) -> VimBinding VimBindingE :: (EventString -> VimState -> MatchResult (EditorM RepeatToken)) -> VimBinding data GotoCharCommand GotoCharCommand :: !Char -> !Direction -> !RegionStyle -> GotoCharCommand data VimState VimState :: !VimMode -> !(Maybe Int) -> !EventString -> !EventString -> !(HashMap RegisterName Register) -> !RegisterName -> !(Maybe RepeatableAction) -> !EventString -> !EventString -> !(Maybe GotoCharCommand) -> !EventString -> ![Point] -> !Bool -> !(Maybe (MacroName, EventString)) -> VimState [vsMode] :: VimState -> !VimMode [vsCount] :: VimState -> !(Maybe Int) -- | for repeat and potentially macros [vsAccumulator] :: VimState -> !EventString [vsTextObjectAccumulator] :: VimState -> !EventString [vsRegisterMap] :: VimState -> !(HashMap RegisterName Register) [vsActiveRegister] :: VimState -> !RegisterName [vsRepeatableAction] :: VimState -> !(Maybe RepeatableAction) -- | see Yi.Keymap.Vim.pureEval comment [vsStringToEval] :: VimState -> !EventString [vsOngoingInsertEvents] :: VimState -> !EventString [vsLastGotoCharCommand] :: VimState -> !(Maybe GotoCharCommand) [vsBindingAccumulator] :: VimState -> !EventString [vsSecondaryCursors] :: VimState -> ![Point] -- | like vim's :help paste [vsPaste] :: VimState -> !Bool [vsCurrentMacroRecording] :: VimState -> !(Maybe (MacroName, EventString)) data Register Register :: RegionStyle -> YiString -> Register [regRegionStyle] :: Register -> RegionStyle [regContent] :: Register -> YiString data RepeatToken Finish :: RepeatToken Drop :: RepeatToken Continue :: RepeatToken data RepeatableAction RepeatableAction :: !Int -> !EventString -> RepeatableAction [raPreviousCount] :: RepeatableAction -> !Int [raActionString] :: RepeatableAction -> !EventString data MatchResult a NoMatch :: MatchResult a PartialMatch :: MatchResult a WholeMatch :: a -> MatchResult a newtype EventString Ev :: Text -> EventString [_unEv] :: EventString -> Text unEv :: Lens' EventString Text newtype OperatorName Op :: Text -> OperatorName [_unOp] :: OperatorName -> Text unOp :: Lens' OperatorName Text type RegisterName = Char lookupBestMatch :: EventString -> [(EventString, a)] -> MatchResult a matchesString :: EventString -> EventString -> MatchResult () instance GHC.Show.Show Yi.Keymap.Vim.Common.RepeatToken instance GHC.Generics.Generic Yi.Keymap.Vim.Common.VimState instance GHC.Generics.Generic Yi.Keymap.Vim.Common.GotoCharCommand instance GHC.Generics.Generic Yi.Keymap.Vim.Common.VimMode instance GHC.Show.Show Yi.Keymap.Vim.Common.VimMode instance GHC.Classes.Eq Yi.Keymap.Vim.Common.VimMode instance GHC.Generics.Generic Yi.Keymap.Vim.Common.Register instance GHC.Show.Show Yi.Keymap.Vim.Common.Register instance GHC.Generics.Generic Yi.Keymap.Vim.Common.RepeatableAction instance GHC.Show.Show Yi.Keymap.Vim.Common.RepeatableAction instance GHC.Classes.Eq Yi.Keymap.Vim.Common.RepeatableAction instance Data.Binary.Class.Binary Yi.Keymap.Vim.Common.RepeatableAction instance Data.Binary.Class.Binary Yi.Keymap.Vim.Common.Register instance Data.Binary.Class.Binary Yi.Keymap.Vim.Common.GotoCharCommand instance Data.Default.Class.Default Yi.Keymap.Vim.Common.VimMode instance Data.Binary.Class.Binary Yi.Keymap.Vim.Common.VimMode instance Data.Default.Class.Default Yi.Keymap.Vim.Common.VimState instance Data.Binary.Class.Binary Yi.Keymap.Vim.Common.VimState instance Yi.Types.YiVariable Yi.Keymap.Vim.Common.VimState instance GHC.Classes.Eq Yi.Keymap.Vim.Common.OperatorName instance GHC.Show.Show Yi.Keymap.Vim.Common.OperatorName instance GHC.Classes.Ord Yi.Keymap.Vim.Common.EventString instance GHC.Classes.Eq Yi.Keymap.Vim.Common.EventString instance GHC.Show.Show Yi.Keymap.Vim.Common.EventString instance Data.String.IsString Yi.Keymap.Vim.Common.EventString instance Data.String.IsString Yi.Keymap.Vim.Common.OperatorName instance GHC.Base.Monoid Yi.Keymap.Vim.Common.EventString instance GHC.Base.Monoid Yi.Keymap.Vim.Common.OperatorName instance Data.Binary.Class.Binary Yi.Keymap.Vim.Common.EventString instance Data.Binary.Class.Binary Yi.Keymap.Vim.Common.OperatorName module Yi.Keymap.Vim.EventUtils stringToEvent :: String -> Event eventToEventString :: Event -> EventString parseEvents :: EventString -> [Event] stringToRepeatableAction :: EventString -> RepeatableAction normalizeCount :: EventString -> EventString splitCountedCommand :: EventString -> (Int, EventString) module Yi.Keymap.Vim.Ex.Types data ExCommand ExCommand :: YiM [Text] -> Bool -> Action -> Bool -> Text -> ExCommand [cmdComplete] :: ExCommand -> YiM [Text] [cmdIsPure] :: ExCommand -> Bool [cmdAction] :: ExCommand -> Action [cmdAcceptsRange] :: ExCommand -> Bool [cmdShow] :: ExCommand -> Text data LineRange -- | 'a,'b MarkRange :: String -> String -> LineRange -- | % FullRange :: LineRange CurrentLineRange :: LineRange evStringToExCommand :: [EventString -> Maybe ExCommand] -> EventString -> Maybe ExCommand instance GHC.Show.Show Yi.Keymap.Vim.Ex.Types.ExCommand -- | Implements common ExCommands for the Vim keymap. module Yi.Keymap.Vim.Ex.Commands.Common parse :: Parser ExCommand -> EventString -> Maybe ExCommand parseWithBang :: Parser a -> (a -> Bool -> Parser ExCommand) -> EventString -> Maybe ExCommand parseWithBangAndCount :: Parser a -> (a -> Bool -> Maybe Int -> Parser ExCommand) -> EventString -> Maybe ExCommand parseRange :: Parser (Maybe (BufferM Region)) data BoolOptionAction BoolOptionSet :: !Bool -> BoolOptionAction BoolOptionInvert :: BoolOptionAction BoolOptionAsk :: BoolOptionAction data TextOptionAction TextOptionSet :: !Text -> TextOptionAction TextOptionAsk :: TextOptionAction parseBoolOption :: Text -> (BoolOptionAction -> Action) -> EventString -> Maybe ExCommand parseTextOption :: Text -> (TextOptionAction -> Action) -> EventString -> Maybe ExCommand filenameComplete :: Text -> YiM [Text] forAllBuffers :: MonadEditor m => (BufferRef -> m ()) -> m () pureExCommand :: ExCommand impureExCommand :: ExCommand -- | Show the common error message about an unsaved file on the status -- line. errorNoWrite :: EditorM () -- | Useful parser for any Ex command that acts kind of like a shell commandArgs :: Parser [Text] needsSaving :: BufferRef -> YiM Bool -- | :buffer ex command to switch to named or numbered buffer. module Yi.Keymap.Vim.Ex.Commands.Buffer parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.BufferDelete parse :: EventString -> Maybe ExCommand -- | :buffers or :ls ex command to list buffers. module Yi.Keymap.Vim.Ex.Commands.Buffers parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Cabal parse :: EventString -> Maybe ExCommand -- | :copy ex command to copy selection to the clipboard. module Yi.Keymap.Vim.Ex.Commands.Copy parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Delete parse :: EventString -> Maybe ExCommand -- | Implements quit commands. module Yi.Keymap.Vim.Ex.Commands.Edit parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.GotoLine parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Help parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Make parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Nohl parse :: EventString -> Maybe ExCommand -- | Implements quit commands. module Yi.Keymap.Vim.Ex.Commands.Quit parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Read parse :: EventString -> Maybe ExCommand -- | :reg[isters] ex command to list yanked texts. module Yi.Keymap.Vim.Ex.Commands.Registers -- | Show registered register and content in new buffer printRegisters :: EditorM () -- | See :help :registers on Vim parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Shell parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Sort parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Substitute parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Global parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Tag parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Undo parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Write parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Commands.Yi parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex.Eval exEvalE :: [EventString -> Maybe ExCommand] -> EventString -> EditorM () exEvalY :: [EventString -> Maybe ExCommand] -> EventString -> YiM () -- | TODO: -- -- respecting wrap in gj, g0, etc -- -- gm, go ]], [[, [], ][ [(, [{, ]), ]} ]m, ]M, [m, [M [ [*, [, ]*, -- ] -- -- Traversing changelist module Yi.Keymap.Vim.Motion data Move Move :: !RegionStyle -> !Bool -> (Maybe Int -> BufferM ()) -> Move [moveStyle] :: Move -> !RegionStyle [moveIsJump] :: Move -> !Bool [moveAction] :: Move -> Maybe Int -> BufferM () data CountedMove CountedMove :: !(Maybe Int) -> !Move -> CountedMove stringToMove :: EventString -> MatchResult Move regionOfMoveB :: CountedMove -> BufferM StyledRegion changeMoveStyle :: (RegionStyle -> RegionStyle) -> Move -> Move module Yi.Keymap.Vim.StateUtils switchMode :: VimMode -> VimState -> VimState switchModeE :: VimMode -> EditorM () resetCount :: VimState -> VimState resetCountE :: EditorM () setCountE :: Int -> EditorM () modifyStateE :: (VimState -> VimState) -> EditorM () getMaybeCountE :: EditorM (Maybe Int) getCountE :: EditorM Int accumulateEventE :: Event -> EditorM () accumulateBindingEventE :: Event -> EditorM () accumulateTextObjectEventE :: EventString -> EditorM () flushAccumulatorE :: EditorM () dropAccumulatorE :: EditorM () dropBindingAccumulatorE :: EditorM () dropTextObjectAccumulatorE :: EditorM () setRegisterE :: RegisterName -> RegionStyle -> YiString -> EditorM () getRegisterE :: RegisterName -> EditorM (Maybe Register) normalizeCountE :: Maybe Int -> EditorM () maybeMult :: Num a => Maybe a -> Maybe a -> Maybe a updateModeIndicatorE :: VimState -> EditorM () saveInsertEventStringE :: EventString -> EditorM () resetActiveRegisterE :: EditorM () -- | This module doesn't contains actual eval, see pureEval comment. module Yi.Keymap.Vim.Eval scheduleActionStringForEval :: EventString -> EditorM () -- | Implements quit commands. module Yi.Keymap.Vim.Ex.Commands.Paste parse :: EventString -> Maybe ExCommand module Yi.Keymap.Vim.Ex exEvalE :: [EventString -> Maybe ExCommand] -> EventString -> EditorM () exEvalY :: [EventString -> Maybe ExCommand] -> EventString -> YiM () evStringToExCommand :: [EventString -> Maybe ExCommand] -> EventString -> Maybe ExCommand data ExCommand ExCommand :: YiM [Text] -> Bool -> Action -> Bool -> Text -> ExCommand [cmdComplete] :: ExCommand -> YiM [Text] [cmdIsPure] :: ExCommand -> Bool [cmdAction] :: ExCommand -> Action [cmdAcceptsRange] :: ExCommand -> Bool [cmdShow] :: ExCommand -> Text defExCommandParsers :: [EventString -> Maybe ExCommand] -- | Utils for the Vim keymap. module Yi.Keymap.Vim.Utils mkBindingE :: VimMode -> RepeatToken -> (Event, EditorM (), VimState -> VimState) -> VimBinding mkBindingY :: VimMode -> (Event, YiM (), VimState -> VimState) -> VimBinding mkStringBindingE :: VimMode -> RepeatToken -> (EventString, EditorM (), VimState -> VimState) -> VimBinding mkStringBindingY :: VimMode -> (EventString, YiM (), VimState -> VimState) -> VimBinding splitCountedCommand :: EventString -> (Int, EventString) selectBinding :: EventString -> VimState -> [VimBinding] -> MatchResult (YiM RepeatToken) -- | All impure bindings will be ignored. selectPureBinding :: EventString -> VimState -> [VimBinding] -> MatchResult (EditorM RepeatToken) matchFromBool :: Bool -> MatchResult () mkMotionBinding :: RepeatToken -> (VimMode -> Bool) -> VimBinding mkChooseRegisterBinding :: (VimState -> Bool) -> VimBinding pasteInclusiveB :: YiString -> RegionStyle -> BufferM () addNewLineIfNecessary :: YiString -> YiString indentBlockRegionB :: Int -> Region -> BufferM () addVimJumpHereE :: EditorM () exportRegisterToClipboard :: RegisterName -> YiM () pasteFromClipboard :: YiM () -- | I'm a module waiting for some kind soul to give me a commentary! module Yi.Keymap.Vim.ExMap defExMap :: [EventString -> Maybe ExCommand] -> [VimBinding] module Yi.Keymap.Vim.InsertMap defInsertMap :: [(String, Char)] -> [VimBinding] -- | Implements some operators for the Vim keymap. module Yi.Keymap.Vim.Operator data VimOperator VimOperator :: !OperatorName -> (Int -> StyledRegion -> EditorM RepeatToken) -> VimOperator [operatorName] :: VimOperator -> !OperatorName [operatorApplyToRegionE] :: VimOperator -> Int -> StyledRegion -> EditorM RepeatToken defOperators :: [VimOperator] opDelete :: VimOperator opChange :: VimOperator opYank :: VimOperator opFormat :: VimOperator stringToOperator :: [VimOperator] -> OperatorName -> Maybe VimOperator mkCharTransformOperator :: OperatorName -> (Char -> Char) -> VimOperator operatorApplyToTextObjectE :: VimOperator -> Int -> CountedTextObject -> EditorM RepeatToken lastCharForOperator :: VimOperator -> String module Yi.Keymap.Vim.NormalMap defNormalMap :: [VimOperator] -> [VimBinding] instance GHC.Classes.Eq Yi.Keymap.Vim.NormalMap.EOLStickiness module Yi.Keymap.Vim.NormalOperatorPendingMap defNormalOperatorPendingMap :: [VimOperator] -> [VimBinding] module Yi.Keymap.Vim.ReplaceMap defReplaceMap :: [VimBinding] module Yi.Keymap.Vim.ReplaceSingleCharMap defReplaceSingleMap :: [VimBinding] module Yi.Keymap.Vim.SearchMotionMap defSearchMotionMap :: [VimBinding] -- | I'm a module waiting for some kind soul to give me a commentary! module Yi.Keymap.Vim.VisualMap defVisualMap :: [VimOperator] -> [VimBinding] -- | The vim keymap. module Yi.Keymap.Vim keymapSet :: KeymapSet mkKeymapSet :: Proto VimConfig -> KeymapSet defVimConfig :: Proto VimConfig data VimBinding VimBindingY :: (EventString -> VimState -> MatchResult (YiM RepeatToken)) -> VimBinding VimBindingE :: (EventString -> VimState -> MatchResult (EditorM RepeatToken)) -> VimBinding data VimOperator VimOperator :: !OperatorName -> (Int -> StyledRegion -> EditorM RepeatToken) -> VimOperator [operatorName] :: VimOperator -> !OperatorName [operatorApplyToRegionE] :: VimOperator -> Int -> StyledRegion -> EditorM RepeatToken data VimConfig VimConfig :: Keymap -> [VimBinding] -> [VimOperator] -> [EventString -> Maybe ExCommand] -> [(String, Char)] -> (Char -> Char) -> VimConfig [vimKeymap] :: VimConfig -> Keymap [vimBindings] :: VimConfig -> [VimBinding] [vimOperators] :: VimConfig -> [VimOperator] [vimExCommandParsers] :: VimConfig -> [EventString -> Maybe ExCommand] [vimDigraphs] :: VimConfig -> [(String, Char)] [vimRelayout] :: VimConfig -> Char -> Char pureEval :: VimConfig -> EventString -> EditorM () impureEval :: VimConfig -> EventString -> Bool -> YiM () relayoutFromTo :: String -> String -> (Char -> Char) module Yi.Config.Default.Vim configureVim :: ConfigM ()