Beispiel #1
0
        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();
        }
Beispiel #2
0
 public InsertMode(VimHandler vh)
     : base(vh)
 {
     AddCommand( new CmdGoToCommandMode(), Key.Escape, ModifierKeys.None);
                 base.Ataching += AtachingEventHandler;
                 base.Detaching += DetachingEventHandler;
 }
Beispiel #3
0
        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();
        }
Beispiel #4
0
 public BasicMode(VimHandler vh)
 {
     this.vh = vh;
     AddCommand(new CmdNextTab(), Key.PageDown, ModifierKeys.Control);
     AddCommand(new CmdPrevTab(), Key.PageUp, ModifierKeys.Control);
     AddCommand(new CmdFullScreen(), Key.F11, ModifierKeys.None);
     AddCommand(new CmdGoToCommandMode(), Key.Escape, ModifierKeys.None);
 }
Beispiel #5
0
 public BasicMode(VimHandler vh)
 {
     this.vh = vh;
                 AddCommand(new CmdNextTab(), Key.PageDown, ModifierKeys.Control);
                 AddCommand( new CmdPrevTab(), Key.PageUp, ModifierKeys.Control);
                 AddCommand( new CmdFullScreen(), Key.F11, ModifierKeys.None);
                 AddCommand( new CmdGoToCommandMode(), Key.Escape, ModifierKeys.None);
 }
Beispiel #6
0
        public void Execute(object arg)
        {
            TextArea ta;

            if ((ta = arg as TextArea) != null)
            {
                VimHandler vh = ta.ActiveInputHandler as VimHandler;
                if (vh != null)
                {
                    Selection sel = ta.Selection;
                    vh.ArgumentMode.ServeArgumentCmd = new CmdRepeatReplaceChar(sel.Length);
                    ViSDGlobalState.State            = State.ArgumentMode;
                }
            }
        }
Beispiel #7
0
        public void Execute(object arg)
        {
            ViSDGlobalCount.ResetCommand();
            TextArea ta = arg as TextArea;

            if (ta != null)
            {
                VimHandler vh = ta.ActiveInputHandler as VimHandler;
                if (vh != null)
                {
                    vh.ArgumentMode.ServeArgumentCmd = new ArgumentCommands.CmdTillChar();
                    ViSDGlobalState.State            = State.ArgumentMode;
                }
            }
        }
Beispiel #8
0
        public void Execute(object arg)
        {
            ViSDGlobalCount.ResetAll();
            TextArea ta = arg as TextArea;

            if (ta != null)
            {
                VimHandler vh = ta.ActiveInputHandler as VimHandler;
                if (vh != null)
                {
                    vh.ArgumentMode.ServeArgumentCmd = new CmdToogleBookmark();
                    ViSDGlobalState.State            = State.ArgumentMode;
                }
            }
        }
Beispiel #9
0
 public MoveMode(VimHandler vh)
     : base(vh)
 {
     AddCommand( new CmdCaretDown(), Key.J, ModifierKeys.None);
                 AddCommand( new CmdCaretUp(), Key.K, ModifierKeys.None);
                 AddCommand( new CmdCaretLeft(), Key.H, ModifierKeys.None);
                 AddCommand( new CmdCaretRight(), Key.L, ModifierKeys.None);
                 AddCommand( new CmdNextWord(), Key.W, ModifierKeys.None);
                 AddCommand( new CmdNextWordBig(), Key.W, ModifierKeys.Shift);
                 AddCommand( new CmdPrevWord(), Key.B, ModifierKeys.None);
                 AddCommand( new CmdPrevWordBig(), Key.B, ModifierKeys.Shift);
                 AddCommand( new CmdEndWord(), Key.E, ModifierKeys.None);
                 AddCommand( new CmdEndWordBig(), Key.E, ModifierKeys.Shift);
                 AddCommand( new CmdGetArgFindChar(), Key.F, ModifierKeys.None);
                 AddCommand( new CmdGetArgFinCharBack(), Key.F, ModifierKeys.Shift);
                 AddCommand( new CmdGetArgTillChar(), Key.T, ModifierKeys.None);
                 AddCommand( new CmdGetArgTillCharBack(), Key.T, ModifierKeys.Shift);
                 AddCommand( new CmdGoToMatchingBace(), Key.D5, ModifierKeys.Shift);
                 AddCommand( new CmdRepeatFindTillChar(), Key.Oem1, ModifierKeys.None);
                 AddCommand( new CmdFindWord(), Key.OemQuestion, ModifierKeys.None);
                 AddCommand( new CmdFindWordBack(), Key.OemQuestion, ModifierKeys.Shift);
                 AddCommand( new CmdGoToNextFindResult(), Key.N, ModifierKeys.None);
                 AddCommand( new CmdGoToPrevFindResult(), Key.N, ModifierKeys.Shift);
                 AddCommand( new CmdPrevIdent(), Key.D3, ModifierKeys.Shift);
                 AddCommand( new CmdNextIdent(), Key.D8, ModifierKeys.Shift);
                 AddCommand( new CmdEOL(), Key.D4, ModifierKeys.Shift);
                 AddCommand( new CmdBOLSoft(), Key.D6, ModifierKeys.Shift);
                 AddCommand( new CmdBOLSoft(), Key.OemMinus, ModifierKeys.Shift);
                 AddCommand( new CmdBOLHard(), Key.D0, ModifierKeys.None);
                 AddCommand( new CmdNextLine(), Key.OemPlus, ModifierKeys.Shift);
                 AddCommand( new CmdPrevLine(), Key.OemMinus, ModifierKeys.None);
                 AddCommand( new CmdPrevParagraph(), Key.OemOpenBrackets, ModifierKeys.Shift);
                 AddCommand( new CmdNextParagraph(), Key.Oem6, ModifierKeys.Shift);
                 AddCommand( new CmdScreenTop(), Key.H, ModifierKeys.Shift);
                 AddCommand( new CmdScreenBottom(), Key.L, ModifierKeys.Shift);
                 AddCommand( new CmdScreenMid(), Key.M, ModifierKeys.Shift);
                 AddCommand( new CmdGetArgToogleBookmark(), Key.M, ModifierKeys.None);
                 AddCommand( new CmdGetArgGoToBookmark(), Key.OemQuotes, ModifierKeys.None);
                 AddCommand( new CmdGetArgGoToBookmark(), Key.Oem3, ModifierKeys.None);
                 AddCommand( new CmdGoToLine(), Key.G, ModifierKeys.Shift);
 }
Beispiel #10
0
 public MoveMode(VimHandler vh) : base(vh)
 {
     AddCommand(new CmdCaretDown(), Key.J, ModifierKeys.None);
     AddCommand(new CmdCaretUp(), Key.K, ModifierKeys.None);
     AddCommand(new CmdCaretLeft(), Key.H, ModifierKeys.None);
     AddCommand(new CmdCaretRight(), Key.L, ModifierKeys.None);
     AddCommand(new CmdNextWord(), Key.W, ModifierKeys.None);
     AddCommand(new CmdNextWordBig(), Key.W, ModifierKeys.Shift);
     AddCommand(new CmdPrevWord(), Key.B, ModifierKeys.None);
     AddCommand(new CmdPrevWordBig(), Key.B, ModifierKeys.Shift);
     AddCommand(new CmdEndWord(), Key.E, ModifierKeys.None);
     AddCommand(new CmdEndWordBig(), Key.E, ModifierKeys.Shift);
     AddCommand(new CmdGetArgFindChar(), Key.F, ModifierKeys.None);
     AddCommand(new CmdGetArgFinCharBack(), Key.F, ModifierKeys.Shift);
     AddCommand(new CmdGetArgTillChar(), Key.T, ModifierKeys.None);
     AddCommand(new CmdGetArgTillCharBack(), Key.T, ModifierKeys.Shift);
     AddCommand(new CmdGoToMatchingBace(), Key.D5, ModifierKeys.Shift);
     AddCommand(new CmdRepeatFindTillChar(), Key.Oem1, ModifierKeys.None);
     AddCommand(new CmdFindWord(), Key.OemQuestion, ModifierKeys.None);
     AddCommand(new CmdFindWordBack(), Key.OemQuestion, ModifierKeys.Shift);
     AddCommand(new CmdGoToNextFindResult(), Key.N, ModifierKeys.None);
     AddCommand(new CmdGoToPrevFindResult(), Key.N, ModifierKeys.Shift);
     AddCommand(new CmdPrevIdent(), Key.D3, ModifierKeys.Shift);
     AddCommand(new CmdNextIdent(), Key.D8, ModifierKeys.Shift);
     AddCommand(new CmdEOL(), Key.D4, ModifierKeys.Shift);
     AddCommand(new CmdBOLSoft(), Key.D6, ModifierKeys.Shift);
     AddCommand(new CmdBOLSoft(), Key.OemMinus, ModifierKeys.Shift);
     AddCommand(new CmdBOLHard(), Key.D0, ModifierKeys.None);
     AddCommand(new CmdNextLine(), Key.OemPlus, ModifierKeys.Shift);
     AddCommand(new CmdPrevLine(), Key.OemMinus, ModifierKeys.None);
     AddCommand(new CmdPrevParagraph(), Key.OemOpenBrackets, ModifierKeys.Shift);
     AddCommand(new CmdNextParagraph(), Key.Oem6, ModifierKeys.Shift);
     AddCommand(new CmdScreenTop(), Key.H, ModifierKeys.Shift);
     AddCommand(new CmdScreenBottom(), Key.L, ModifierKeys.Shift);
     AddCommand(new CmdScreenMid(), Key.M, ModifierKeys.Shift);
     AddCommand(new CmdGetArgToogleBookmark(), Key.M, ModifierKeys.None);
     AddCommand(new CmdGetArgGoToBookmark(), Key.OemQuotes, ModifierKeys.None);
     AddCommand(new CmdGetArgGoToBookmark(), Key.Oem3, ModifierKeys.None);
     AddCommand(new CmdGoToLine(), Key.G, ModifierKeys.Shift);
 }
Beispiel #11
0
 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();
 }
Beispiel #12
0
 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();
 }
Beispiel #13
0
 public ArgumentMode(VimHandler vh)
     : base(vh)
 {
     base.Ataching += AtachingEventHandler;
     base.Detaching += DetachingEventHandler;
 }
Beispiel #14
0
 public InsertMode(VimHandler vh) : base(vh)
 {
     AddCommand(new CmdGoToCommandMode(), Key.Escape, ModifierKeys.None);
     base.Ataching  += AtachingEventHandler;
     base.Detaching += DetachingEventHandler;
 }
Beispiel #15
0
 public ArgumentMode(VimHandler vh) : base(vh)
 {
     base.Ataching  += AtachingEventHandler;
     base.Detaching += DetachingEventHandler;
 }