yi-0.7.1: The Haskell-Scriptable Editor

Safe HaskellNone



Vim keymap for Yi. Emulates vim :set nocompatible



viWrite :: YiM ()Source

Try to write a file in the manner of vi/vim Need to catch any exception to avoid losing bindings

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.




v_top_level :: VimMode

Top level mode

v_ins_char :: VimMode

vim insert mode

v_opts :: VimOpts
v_ex_cmds :: VimExCmdMap

data VimExCmd Source




cmdNames :: [String]
cmdFn :: String -> YiM ()
completeFn :: Maybe (String -> YiM ())

exCmd :: String -> (String -> YiM ()) -> Maybe (String -> YiM ()) -> VimExCmdSource

exCmds :: [(String, String -> YiM (), Maybe (String -> YiM ()))] -> VimExCmdMapSource

savingInsertB :: BufferM () -> BufferM ()Source

The given buffer action should be an insertion action.

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.

savingCommandY :: (Int -> YiM ()) -> Int -> YiM ()Source

beginIns :: (Show x, YiAction a x) => ModeMap -> a -> I Event Action ()Source

exEval :: ModeMap -> String -> YiM ()Source

eval an ex command to an YiM (), also appends to the ex history