本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}