public VisualLineMode(VimHandler vh) : base(vh) { CurBeginPos = 0; IViCommand cmd = new CmdGoToCommandMode(); AddCommand(cmd, Key.Escape, ModifierKeys.None); AddCommand(cmd, Key.Escape, ModifierKeys.Shift); AddCommand(new CmdYank(), Key.Y, ModifierKeys.Shift); AddCommand(new CmdYank(), Key.Y, ModifierKeys.None); IViCommand CutCmd = new CmdCut(); AddCommand(CutCmd, Key.D, ModifierKeys.None); AddCommand(CutCmd, Key.D, ModifierKeys.Shift); AddCommand(CutCmd, Key.X, ModifierKeys.None); AddCommand(CutCmd, Key.X, ModifierKeys.Shift); AddCommand(new CmdPaste(), Key.P, ModifierKeys.Shift); AddCommand(new CmdPasteCopy(), Key.P, ModifierKeys.None); IViCommand rep = new CmdReplaceString(); AddCommand(rep, Key.C, ModifierKeys.None); AddCommand(rep, Key.C, ModifierKeys.Shift); AddCommand(rep, Key.S, ModifierKeys.None); AddCommand(rep, Key.S, ModifierKeys.Shift); AddCommand(new CmdReplaceChar(), Key.R, ModifierKeys.None); RestKeys = new CmdNothing(); }
public CommandMode(VimHandler vh) : base(vh) { AddCommand(new CmdGoToInsertMode(), Key.I, ModifierKeys.None); AddCommand(new CmdRepeatLastAction(), Key.OemPeriod, ModifierKeys.None); AddCommand(new CmdGetArgReplaceChar(), Key.R, ModifierKeys.None); AddCommand(new CmdDelete(), Key.X, ModifierKeys.None); AddCommand(new CmdBackspace(), Key.X, ModifierKeys.Shift); AddCommand(new CmdJoinLines(), Key.J, ModifierKeys.Shift); AddCommand(new CmdAppend(), Key.A, ModifierKeys.None); AddCommand(new CmdAppendEOL(), Key.A, ModifierKeys.Shift); AddCommand(new CmdInsertBOL(), Key.I, ModifierKeys.Shift); AddCommand(new CmdOpenBelowInsert(), Key.O, ModifierKeys.None); AddCommand(new CmdOpenAboveInsert(), Key.O, ModifierKeys.Shift); AddCommand(new CmdDelEOL(), Key.D, ModifierKeys.Shift); AddCommand(new CmdChangeEOLInsert(), Key.C, ModifierKeys.Shift); AddCommand(new CmdSubLineInsert(), Key.S, ModifierKeys.Shift); AddCommand(new CmdSubCharInsert(), Key.S, ModifierKeys.None); AddCommand(new CmdReplaceMode(), Key.R, ModifierKeys.Shift); AddCommand(new CmdServeEsc(), Key.Escape, ModifierKeys.None); AddCommand(new CmdSwitchVisualMode(), Key.V, ModifierKeys.None); AddCommand(new CmdSwitchVisualLineMode(), Key.V, ModifierKeys.Shift); RestKeys = new CmdNothing(); }