void UpdateEditMode()
 {
     if (Options.UseViModes)
     {
         if (TestNewViMode)
         {
             if (!(CurrentMode is NewIdeViMode))
             {
                 CurrentMode = new NewIdeViMode(this);
             }
         }
         else
         {
             if (!(CurrentMode is IdeViMode))
             {
                 CurrentMode = new IdeViMode(this);
             }
         }
     }
     else
     {
         //		if (!(CurrentMode is SimpleEditMode)){
         SimpleEditMode simpleMode = new SimpleEditMode();
         simpleMode.KeyBindings [EditMode.GetKeyCode(Gdk.Key.Tab)]       = new TabAction(this).Action;
         simpleMode.KeyBindings [EditMode.GetKeyCode(Gdk.Key.BackSpace)] = EditActions.AdvancedBackspace;
         CurrentMode = simpleMode;
         //		}
     }
 }
Exemplo n.º 2
0
 void UpdateEditMode()
 {
     if (MonoDevelop.Ide.Editor.DefaultSourceEditorOptions.Instance.UseViModes)
     {
         if (TestNewViMode)
         {
             if (!(CurrentMode is NewIdeViMode))
             {
                 CurrentMode = new NewIdeViMode(this);
             }
         }
         else
         {
             if (!(CurrentMode is IdeViMode))
             {
                 CurrentMode = new IdeViMode(this);
             }
         }
     }
     else
     {
         //		if (!(CurrentMode is SimpleEditMode)){
         SimpleEditMode simpleMode = new SimpleEditMode();
         simpleMode.KeyBindings [Mono.TextEditor.EditMode.GetKeyCode(Gdk.Key.Tab)]       = new TabAction(this).Action;
         simpleMode.KeyBindings [Mono.TextEditor.EditMode.GetKeyCode(Gdk.Key.BackSpace)] = EditActions.AdvancedBackspace;
         CurrentMode = simpleMode;
         //		}
     }
 }
Exemplo n.º 3
0
		void UpdateEditMode ()
		{
			if (Options.UseViModes) {
				if (!(CurrentMode is IdeViMode))
					CurrentMode = new IdeViMode (this);
			} else {
		//		if (!(CurrentMode is SimpleEditMode)){
					SimpleEditMode simpleMode = new SimpleEditMode ();
					simpleMode.KeyBindings [EditMode.GetKeyCode (Gdk.Key.Tab)] = new TabAction (this).Action;
					simpleMode.KeyBindings [EditMode.GetKeyCode (Gdk.Key.BackSpace)] = EditActions.AdvancedBackspace;
					CurrentMode = simpleMode;
		//		}
			}
		}
Exemplo n.º 4
0
		void UpdateEditMode ()
		{
			if (MonoDevelop.Ide.Editor.DefaultSourceEditorOptions.Instance.UseViModes) {
				if (TestNewViMode) {
					if (!(CurrentMode is NewIdeViMode))
					CurrentMode = new NewIdeViMode (this);
				} else {
					if (!(CurrentMode is IdeViMode))
						CurrentMode = new IdeViMode (this);
				}
			} else {
		//		if (!(CurrentMode is SimpleEditMode)){
					SimpleEditMode simpleMode = new SimpleEditMode ();
					simpleMode.KeyBindings [Mono.TextEditor.EditMode.GetKeyCode (Gdk.Key.Tab)] = new TabAction (this).Action;
					simpleMode.KeyBindings [Mono.TextEditor.EditMode.GetKeyCode (Gdk.Key.BackSpace)] = EditActions.AdvancedBackspace;
					CurrentMode = simpleMode;
		//		}
			}
		}