本文整理汇总了C#中IVimLocalSettings类的典型用法代码示例。如果您正苦于以下问题:C# IVimLocalSettings类的具体用法?C# IVimLocalSettings怎么用?C# IVimLocalSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IVimLocalSettings类属于命名空间,在下文中一共展示了IVimLocalSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateCommonOperations
internal static ICommonOperations CreateCommonOperations(
ITextView textView,
IVimLocalSettings localSettings,
IOutliningManager outlining = null,
IStatusUtil statusUtil = null,
ISearchService searchService = null,
IUndoRedoOperations undoRedoOperations = null,
IVimData vimData = null,
IVimHost vimHost = null,
ITextStructureNavigator navigator = null,
IClipboardDevice clipboardDevice = null,
IFoldManager foldManager = null)
{
var editorOperations = EditorUtil.GetOperations(textView);
var editorOptions = EditorUtil.FactoryService.EditorOptionsFactory.GetOptions(textView);
var jumpList = new JumpList(new TrackingLineColumnService());
var keyMap = new KeyMap();
foldManager = foldManager ?? new FoldManager(textView.TextBuffer);
statusUtil = statusUtil ?? new StatusUtil();
searchService = searchService ?? CreateSearchService(localSettings.GlobalSettings);
undoRedoOperations = undoRedoOperations ??
new UndoRedoOperations(statusUtil, FSharpOption<ITextUndoHistory>.None);
vimData = vimData ?? new VimData();
vimHost = vimHost ?? new MockVimHost();
navigator = navigator ?? CreateTextStructureNavigator(textView.TextBuffer);
clipboardDevice = clipboardDevice ?? new MockClipboardDevice();
var operationsData = new OperationsData(
editorOperations,
editorOptions,
foldManager,
jumpList,
keyMap,
localSettings,
outlining != null ? FSharpOption.Create(outlining) : FSharpOption<IOutliningManager>.None,
CreateRegisterMap(clipboardDevice),
searchService,
EditorUtil.FactoryService.SmartIndentationService,
statusUtil,
textView,
undoRedoOperations,
vimData,
vimHost,
navigator);
return new CommonOperations(operationsData);
}
示例2: VimRcLoaded
public virtual void VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
{
}
示例3: VimRcLoaded
public override void VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
{
if (vimRcState.IsLoadFailed)
{
// If we failed to load a vimrc file then we should add a couple of sanity
// settings. Otherwise the Visual Studio experience wont't be what users expect
localSettings.AutoIndent = true;
}
}
示例4: Create
protected void Create(params string[] lines)
{
_vimHost = (MockVimHost)Vim.VimHost;
_textView = CreateTextView(lines);
_textBuffer = _textView.TextBuffer;
_vimTextBuffer = Vim.CreateVimTextBuffer(_textBuffer);
_localSettings = _vimTextBuffer.LocalSettings;
var foldManager = CreateFoldManager(_textView);
_factory = new MockRepository(MockBehavior.Loose);
_statusUtil = _factory.Create<IStatusUtil>();
_bulkOperations = new TestableBulkOperations();
var vimBufferData = CreateVimBufferData(
_vimTextBuffer,
_textView,
statusUtil: _statusUtil.Object);
_jumpList = vimBufferData.JumpList;
_windowSettings = vimBufferData.WindowSettings;
_vimData = Vim.VimData;
_macroRecorder = Vim.MacroRecorder;
_globalSettings = Vim.GlobalSettings;
var operations = CreateCommonOperations(vimBufferData);
_motionUtil = new MotionUtil(vimBufferData, operations);
_commandUtil = new CommandUtil(
vimBufferData,
_motionUtil,
operations,
foldManager,
new InsertUtil(vimBufferData, operations),
_bulkOperations);
}
示例5: Create
private void Create(ITextView textView)
{
_textView = textView;
_textBuffer = textView.TextBuffer;
_buffer = _textView.TextBuffer;
_snapshot = _buffer.CurrentSnapshot;
_buffer.Changed += delegate { _snapshot = _buffer.CurrentSnapshot; };
_globalSettings = new Vim.GlobalSettings();
_localSettings = new LocalSettings(_globalSettings, _textView);
_markMap = new MarkMap(new TrackingLineColumnService());
_vimData = new VimData();
_search = VimUtil.CreateSearchService(_globalSettings);
_jumpList = VimUtil.CreateJumpList();
_statusUtil = new Mock<IStatusUtil>(MockBehavior.Strict);
_navigator = VimUtil.CreateTextStructureNavigator(_textView.TextBuffer);
_motionUtil = new MotionUtil(
_textView,
_markMap,
_localSettings,
_search,
_navigator,
_jumpList,
_statusUtil.Object,
_vimData);
}
示例6: SetUp
public void SetUp()
{
_textView= new Mock<ITextView>(MockBehavior.Strict);
_global = new Mock<IVimGlobalSettings>(MockBehavior.Strict);
_localRaw = new LocalSettings(_global.Object, _textView.Object);
_local = _localRaw;
}
示例7: Create
private void Create(ITextView textView, IEditorOptions editorOptions = null)
{
_textView = textView;
_textBuffer = textView.TextBuffer;
_snapshot = _textBuffer.CurrentSnapshot;
_textBuffer.Changed += delegate { _snapshot = _textBuffer.CurrentSnapshot; };
_globalSettings = new Vim.GlobalSettings();
_localSettings = new LocalSettings(_globalSettings, FSharpOption.CreateForReference(editorOptions), FSharpOption.CreateForReference(textView));
_markMap = new MarkMap(new TrackingLineColumnService());
_vimData = new VimData();
_search = VimUtil.CreateSearchService(_globalSettings);
_jumpList = VimUtil.CreateJumpList();
_statusUtil = new Mock<IStatusUtil>(MockBehavior.Strict);
_navigator = VimUtil.CreateTextStructureNavigator(_textView, WordKind.NormalWord);
_motionUtil = new MotionUtil(
_textView,
_markMap,
_localSettings,
_search,
_navigator,
_jumpList,
_statusUtil.Object,
VimUtil.GetWordUtil(textView),
_vimData);
}
示例8: Setup
public void Setup()
{
_synchronizer = new EditorToSettingSynchronizer(EditorUtil.FactoryService.Vim);
_buffer = EditorUtil.FactoryService.Vim.CreateBuffer(EditorUtil.CreateTextView(""));
_localSettings = _buffer.LocalSettings;
_globalSettings = _localSettings.GlobalSettings;
_editorOptions = _localSettings.EditorOptions.Value;
}
示例9: EditorToSettingSynchronizerTest
public EditorToSettingSynchronizerTest()
{
_synchronizer = new EditorToSettingSynchronizer(EditorOptionsFactoryService, Vim);
_buffer = CreateVimBuffer("");
_localSettings = _buffer.LocalSettings;
_globalSettings = _localSettings.GlobalSettings;
_editorOptions = _buffer.TextView.Options;
}
示例10: Setup
public void Setup()
{
_synchronizer = new EditorToSettingSynchronizer(EditorUtil.FactoryService.EditorOptionsFactory, EditorUtil.FactoryService.Vim);
var textView = EditorUtil.CreateTextView("");
_buffer = EditorUtil.FactoryService.Vim.CreateVimBuffer(textView);
_localSettings = _buffer.LocalSettings;
_globalSettings = _localSettings.GlobalSettings;
_editorOptions = EditorUtil.FactoryService.EditorOptionsFactory.GetOptions(textView);
}
示例11: 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;
}
示例12: Create
public void Create(ITextView textView)
{
_textView = textView;
_buffer = _textView.TextBuffer;
_snapshot = _buffer.CurrentSnapshot;
_buffer.Changed += delegate { _snapshot = _buffer.CurrentSnapshot; };
_settings = new Vim.GlobalSettings();
_localSettings = new LocalSettings(_settings, _textView);
_utilRaw = new TextViewMotionUtil(_textView, _localSettings);
_util = _utilRaw;
}
示例13: Create
/// <summary>
/// Create the IVimBuffer with the given set of lines. Note that we intentionally don't
/// set the mode to Insert here because the given commands should work irrespective of the
/// mode
/// </summary>
/// <param name="lines"></param>
private void Create(params string[] lines)
{
_textView = CreateTextView(lines);
_textBuffer = _textView.TextBuffer;
_vimBuffer = Vim.CreateVimBuffer(_textView);
_globalSettings = _vimBuffer.GlobalSettings;
_localSettings = _vimBuffer.LocalSettings;
var operations = CommonOperationsFactory.GetCommonOperations(_vimBuffer.VimBufferData);
_insertUtilRaw = new InsertUtil(_vimBuffer.VimBufferData, operations);
_insertUtil = _insertUtilRaw;
}
示例14: EditorToSettingSynchronizerTest
public EditorToSettingSynchronizerTest()
{
_synchronizer = new EditorToSettingSynchronizer();
var textView = CreateTextView();
var globalSettings = new GlobalSettings();
_localSettings = new LocalSettings(globalSettings);
_windowSettings = new WindowSettings(globalSettings);
_editorOptions = textView.Options;
_vimBuffer = new Mock<IVimBuffer>(MockBehavior.Strict);
_vimBuffer.SetupGet(x => x.LocalSettings).Returns(_localSettings);
_vimBuffer.SetupGet(x => x.WindowSettings).Returns(_windowSettings);
_vimBuffer.SetupGet(x => x.TextView).Returns(textView);
}
示例15: Create
public void Create(ITextView textView)
{
_textView = textView;
_buffer = _textView.TextBuffer;
_snapshot = _buffer.CurrentSnapshot;
_buffer.Changed += delegate { _snapshot = _buffer.CurrentSnapshot; };
_settings = new Vim.GlobalSettings();
_localSettings = new LocalSettings(_settings, _textView);
_markMap = new MarkMap(new TrackingLineColumnService());
_utilRaw = new TextViewMotionUtil(
_textView,
_markMap,
_localSettings);
_util = _utilRaw;
}