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


C# IVimLocalSettings类代码示例

本文整理汇总了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);
 }
开发者ID:rride,项目名称:VsVim,代码行数:45,代码来源:VimUtil.cs

示例2: VimRcLoaded

 public virtual void VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
 {
 }
开发者ID:nligerakis,项目名称:VsVim,代码行数:3,代码来源:VimHost.cs

示例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;
     }
 }
开发者ID:honeyhoneywell,项目名称:VsVim,代码行数:9,代码来源:VsVimHost.cs

示例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);
        }
开发者ID:soundarmoorthy,项目名称:VsVim,代码行数:35,代码来源:CommandUtilTest.cs

示例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);
 }
开发者ID:bentayloruk,项目名称:VsVim,代码行数:25,代码来源:MotionUtilTest.cs

示例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;
 }
开发者ID:ameent,项目名称:VsVim,代码行数:7,代码来源:LocalSettingsTest.cs

示例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);
 }
开发者ID:franch,项目名称:VsVim,代码行数:25,代码来源:MotionUtilTest.cs

示例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;
 }
开发者ID:DanBlanchard,项目名称:VsVim,代码行数:8,代码来源:EditorToSettingSynchronizerTest.cs

示例9: EditorToSettingSynchronizerTest

        public EditorToSettingSynchronizerTest()
        {
            _synchronizer = new EditorToSettingSynchronizer(EditorOptionsFactoryService, Vim);

            _buffer = CreateVimBuffer("");
            _localSettings = _buffer.LocalSettings;
            _globalSettings = _localSettings.GlobalSettings;
            _editorOptions = _buffer.TextView.Options;
        }
开发者ID:fpicalausa,项目名称:VsVim,代码行数:9,代码来源:EditorToSettingSynchronizerTest.cs

示例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);
        }
开发者ID:GunioRobot,项目名称:VsVim,代码行数:10,代码来源:EditorToSettingSynchronizerTest.cs

示例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;
 }
开发者ID:mrmonday,项目名称:VsVim,代码行数:10,代码来源:InsertModeIntegrationTest.cs

示例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;
 }
开发者ID:praveennet,项目名称:VsVim,代码行数:11,代码来源:TextViewMotionUtilTest.cs

示例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;
        }
开发者ID:Vintharas,项目名称:VsVim,代码行数:18,代码来源:InsertUtilTest.cs

示例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);
        }
开发者ID:kun-liu,项目名称:VsVim,代码行数:14,代码来源:EditorToSettingSynchronizerTest.cs

示例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;
 }
开发者ID:rride,项目名称:VsVim,代码行数:15,代码来源:TextViewMotionUtilTest.cs


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