当前位置: 首页>>代码示例>>C#>>正文


C# IVimBuffer.SwitchMode方法代码示例

本文整理汇总了C#中IVimBuffer.SwitchMode方法的典型用法代码示例。如果您正苦于以下问题:C# IVimBuffer.SwitchMode方法的具体用法?C# IVimBuffer.SwitchMode怎么用?C# IVimBuffer.SwitchMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IVimBuffer的用法示例。


在下文中一共展示了IVimBuffer.SwitchMode方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Create

 protected void Create(params string[] lines)
 {
     _textView = CreateTextView(lines);
     _vimBuffer = Vim.CreateVimBuffer(_textView);
     _vimBuffer.SwitchMode(ModeKind.Normal, ModeArgument.None);
     _globalSettings = _vimBuffer.LocalSettings.GlobalSettings;
     VimHost.FocusedTextView = _textView;
 }
开发者ID:gimac,项目名称:VsVim,代码行数:8,代码来源:MacroIntegrationTest.cs

示例2: CreateBuffer

 public void CreateBuffer(params string[] lines)
 {
     var tuple = EditorUtil.CreateViewAndOperations(lines);
     _textView = tuple.Item1;
     var service = EditorUtil.FactoryService;
     _buffer = service.vim.CreateBuffer(_textView);
     _buffer.SwitchMode(ModeKind.Insert, ModeArgument.None);
 }
开发者ID:praveennet,项目名称:VsVim,代码行数:8,代码来源:InsertModeIntegrationTest.cs

示例3: VimBufferTest

 public VimBufferTest()
 {
     _textView = CreateTextView("here we go");
     _textView.MoveCaretTo(0);
     _vimBuffer = Vim.CreateVimBuffer(_textView);
     _vimBuffer.SwitchMode(ModeKind.Command, ModeArgument.None);
     _keyMap = _vimBuffer.Vim.KeyMap;
     _vimBufferRaw = (VimBuffer)_vimBuffer;
     _factory = new MockRepository(MockBehavior.Strict);
 }
开发者ID:Kazark,项目名称:VsVim,代码行数:10,代码来源:VimBufferTest.cs

示例4: Create

 protected void Create(ModeArgument argument, params string[] lines)
 {
     _textView = CreateTextView(lines);
     _textBuffer = _textView.TextBuffer;
     _vimBuffer = Vim.CreateVimBuffer(_textView);
     _vimBuffer.SwitchMode(ModeKind.Insert, argument);
     _register = Vim.RegisterMap.GetRegister('c');
     _globalSettings = Vim.GlobalSettings;
     _localSettings = _vimBuffer.LocalSettings;
 }
开发者ID:mrmonday,项目名称:VsVim,代码行数:10,代码来源:InsertModeIntegrationTest.cs

示例5: Create

 public void Create(params string[] lines)
 {
     _context = new TestableSynchronizationContext();
     SynchronizationContext.SetSynchronizationContext(_context);
     var tuple = EditorUtil.CreateViewAndOperations(lines);
     _textView = tuple.Item1;
     var service = EditorUtil.FactoryService;
     _buffer = service.Vim.CreateBuffer(_textView);
     _buffer.SwitchMode(ModeKind.Normal, ModeArgument.None);
     Assert.IsTrue(_context.IsEmpty);
 }
开发者ID:bentayloruk,项目名称:VsVim,代码行数:11,代码来源:VisualModeIntegrationTest.cs

示例6: Create

        public void Create(params string[] lines)
        {
            _context = new TestableSynchronizationContext();
            SynchronizationContext.SetSynchronizationContext(_context);
            _textView = CreateTextView(lines);
            _textBuffer = _textView.TextBuffer;
            _vimBuffer = Vim.CreateVimBuffer(_textView);
            _vimBuffer.SwitchMode(ModeKind.Normal, ModeArgument.None);
            _vimTextBuffer = _vimBuffer.VimTextBuffer;
            _registerMap = _vimBuffer.RegisterMap;
            _globalSettings = _vimBuffer.LocalSettings.GlobalSettings;
            Assert.IsTrue(_context.IsEmpty);

            // Need to make sure it's focused so macro recording will work
            ((MockVimHost)_vimBuffer.Vim.VimHost).FocusedTextView = _textView;
        }
开发者ID:davislg,项目名称:VsVim,代码行数:16,代码来源:VisualModeIntegrationTest.cs

示例7: Create

        public void Create(params string[] lines)
        {
            _context = new TestableSynchronizationContext();
            SynchronizationContext.SetSynchronizationContext(_context);
            var tuple = EditorUtil.CreateTextViewAndEditorOperations(lines);
            _textView = tuple.Item1;
            _textBuffer = _textView.TextBuffer;
            var service = EditorUtil.FactoryService;
            _buffer = service.Vim.CreateVimBuffer(_textView);
            _buffer.SwitchMode(ModeKind.Normal, ModeArgument.None);
            _vimTextBuffer = _buffer.VimTextBuffer;
            _registerMap = _buffer.RegisterMap;
            _globalSettings = _buffer.LocalSettings.GlobalSettings;
            Assert.IsTrue(_context.IsEmpty);

            // Need to make sure it's focused so macro recording will work
            ((MockVimHost)_buffer.Vim.VimHost).FocusedTextView = _textView;
        }
开发者ID:sehe,项目名称:VsVim,代码行数:18,代码来源:VisualModeIntegrationTest.cs

示例8: Setup

 public void Setup()
 {
     _textView = EditorUtil.CreateView("here we go");
     _textView.MoveCaretTo(0);
     _buffer = EditorUtil.FactoryService.Vim.CreateBuffer(_textView);
     _buffer.SwitchMode(ModeKind.Command, ModeArgument.None);
     _keyMap = _buffer.Vim.KeyMap;
     _bufferRaw = (VimBuffer)_buffer;
     _factory = new MockRepository(MockBehavior.Strict);
 }
开发者ID:bentayloruk,项目名称:VsVim,代码行数:10,代码来源:VimBufferTests.cs

示例9: Create

 private void Create(ModeArgument argument, params string[] lines)
 {
     var tuple = EditorUtil.CreateTextViewAndEditorOperations(lines);
     _textView = tuple.Item1;
     _textBuffer = _textView.TextBuffer;
     var service = EditorUtil.FactoryService;
     _vimBuffer = service.Vim.CreateVimBuffer(_textView);
     _vimBuffer.SwitchMode(ModeKind.Insert, argument);
     _register = Vim.RegisterMap.GetRegister('c');
     _globalSettings = Vim.GlobalSettings;
     _localSettings = _vimBuffer.LocalSettings;
 }
开发者ID:philipmat,项目名称:VsVim,代码行数:12,代码来源:InsertModeIntegrationTest.cs

示例10: Create

 private void Create(params string[] lines)
 {
     _textView = EditorUtil.CreateTextView(lines);
     _buffer = EditorUtil.FactoryService.Vim.CreateBuffer(_textView);
     _buffer.SwitchMode(ModeKind.Normal, ModeArgument.None);
     _globalSettings = _buffer.LocalSettings.GlobalSettings;
     ((MockVimHost)_buffer.Vim.VimHost).FocusedTextView = _textView;
 }
开发者ID:franch,项目名称:VsVim,代码行数:8,代码来源:MacroIntegrationTest.cs


注:本文中的IVimBuffer.SwitchMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。