yi-0.6.2.3: The Haskell-Scriptable EditorSource codeContentsIndex
Yi.Keymap.Vim
Description
Vim keymap for Yi. Emulates vim :set nocompatible
Synopsis
keymapSet :: KeymapSet
viWrite :: YiM ()
defKeymap :: Proto ModeMap
leaveInsRep :: VimMode
leave :: VimMode
data ModeMap = ModeMap {
v_top_level :: VimMode
v_ins_char :: VimMode
v_opts :: VimOpts
v_ex_cmds :: VimExCmdMap
}
data VimOpts = VimOpts {
tildeop :: Bool
completeCaseSensitive :: Bool
enableTagStack :: Bool
}
data VimExCmd = VimExCmd {
cmdNames :: [String]
cmdFn :: String -> YiM ()
completeFn :: Maybe (String -> YiM ())
}
nilCmd :: VimExCmd
exCmd :: String -> (String -> YiM ()) -> Maybe (String -> YiM ()) -> VimExCmd
exCmds :: [(String, String -> YiM (), Maybe (String -> YiM ()))] -> VimExCmdMap
exSimpleComplete :: (String -> YiM [String]) -> String -> YiM ()
exInfixComplete' :: Bool -> (String -> YiM [String]) -> String -> YiM ()
exInfixComplete :: (String -> YiM [String]) -> String -> YiM ()
mkExHistComplete :: (String -> String -> Bool) -> (String -> YiM [String]) -> String -> YiM ()
exHistComplete' :: Bool -> (String -> YiM [String]) -> String -> YiM ()
exHistComplete :: (String -> YiM [String]) -> String -> YiM ()
exHistInfixComplete' :: Bool -> (String -> YiM [String]) -> String -> YiM ()
exHistInfixComplete :: (String -> YiM [String]) -> String -> YiM ()
savingInsertB :: BufferM () -> BufferM ()
savingInsertCharB :: Char -> BufferM ()
savingInsertStringB :: String -> BufferM ()
savingDeleteB :: BufferM () -> BufferM ()
savingDeleteCharB :: Direction -> BufferM ()
savingDeleteWordB :: Direction -> BufferM ()
savingCommandY :: (Int -> YiM ()) -> Int -> YiM ()
savingCommandE :: (Int -> EditorM ()) -> Int -> EditorM ()
mkKeymap :: Proto ModeMap -> KeymapSet
beginIns :: (Show x, YiAction a x) => ModeMap -> a -> I Event Action ()
beginInsE :: ModeMap -> EditorM () -> I Event Action ()
beginInsB :: ModeMap -> BufferM () -> I Event Action ()
listTagStack :: EditorM [(FilePath, Point)]
pushTagStack :: FilePath -> Point -> EditorM ()
popTagStack :: Int -> EditorM (Maybe (FilePath, Point))
peekTagStack :: EditorM (Maybe (FilePath, Point))
Documentation
keymapSet :: KeymapSetSource
viWrite :: YiM ()Source
Try to write a file in the manner of vi/vim Need to catch any exception to avoid losing bindings
defKeymap :: Proto ModeMapSource
leaveInsRep :: VimModeSource
leave :: VimModeSource
Leave a mode. This always has priority over catch-all actions inside the mode.
data ModeMap Source
The Vim keymap is divided into several parts, roughly corresponding to the different modes of vi. Each mode is in turn broken up into separate VimProcs for each phase of key input in that mode.
Constructors
ModeMap
v_top_level :: VimModeTop level mode
v_ins_char :: VimModevim insert mode
v_opts :: VimOpts
v_ex_cmds :: VimExCmdMap
data VimOpts Source
Constructors
VimOpts
tildeop :: Bool
completeCaseSensitive :: Bool
enableTagStack :: Bool
data VimExCmd Source
Constructors
VimExCmd
cmdNames :: [String]
cmdFn :: String -> YiM ()
completeFn :: Maybe (String -> YiM ())
nilCmd :: VimExCmdSource
exCmd :: String -> (String -> YiM ()) -> Maybe (String -> YiM ()) -> VimExCmdSource
exCmds :: [(String, String -> YiM (), Maybe (String -> YiM ()))] -> VimExCmdMapSource
exSimpleComplete :: (String -> YiM [String]) -> String -> YiM ()Source
exInfixComplete' :: Bool -> (String -> YiM [String]) -> String -> YiM ()Source
exInfixComplete :: (String -> YiM [String]) -> String -> YiM ()Source
mkExHistComplete :: (String -> String -> Bool) -> (String -> YiM [String]) -> String -> YiM ()Source
exHistComplete' :: Bool -> (String -> YiM [String]) -> String -> YiM ()Source
exHistComplete :: (String -> YiM [String]) -> String -> YiM ()Source
exHistInfixComplete' :: Bool -> (String -> YiM [String]) -> String -> YiM ()Source
exHistInfixComplete :: (String -> YiM [String]) -> String -> YiM ()Source
savingInsertB :: BufferM () -> BufferM ()Source
The given buffer action should be an insertion action.
savingInsertCharB :: Char -> BufferM ()Source
savingInsertStringB :: String -> BufferM ()Source
savingDeleteB :: BufferM () -> BufferM ()Source
The given action should be a deletion action. The only well tested buffer actions are deleting one character, or one word, forward or backward.
savingDeleteCharB :: Direction -> BufferM ()Source
savingDeleteWordB :: Direction -> BufferM ()Source
savingCommandY :: (Int -> YiM ()) -> Int -> YiM ()Source
savingCommandE :: (Int -> EditorM ()) -> Int -> EditorM ()Source
mkKeymap :: Proto ModeMap -> KeymapSetSource
beginIns :: (Show x, YiAction a x) => ModeMap -> a -> I Event Action ()Source
beginInsE :: ModeMap -> EditorM () -> I Event Action ()Source
beginInsB :: ModeMap -> BufferM () -> I Event Action ()Source
listTagStack :: EditorM [(FilePath, Point)]Source
pushTagStack :: FilePath -> Point -> EditorM ()Source
popTagStack :: Int -> EditorM (Maybe (FilePath, Point))Source
peekTagStack :: EditorM (Maybe (FilePath, Point))Source
Produced by Haddock version 2.6.1