• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IVimLocalSettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IVimLocalSettings的典型用法代码示例。如果您正苦于以下问题:C# IVimLocalSettings类的具体用法?C# IVimLocalSettings怎么用?C# IVimLocalSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IVimLocalSettings类属于命名空间,在下文中一共展示了IVimLocalSettings类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: CreateVimTextBuffer

 /// <summary>
 /// Create a Mock over IVimTextBuffer which provides the msot basic functions
 /// </summary>
 public static Mock<IVimTextBuffer> CreateVimTextBuffer(
     ITextBuffer textBuffer,
     IVimLocalSettings localSettings = null,
     IVim vim = null,
     ITextStructureNavigator wordNavigator = null,
     IUndoRedoOperations undoRedoOperations = null,
     MockRepository factory = null)
 {
     factory = factory ?? new MockRepository(MockBehavior.Strict);
     vim = vim ?? CreateVim(factory: factory).Object;
     localSettings = localSettings ?? CreateLocalSettings(factory: factory).Object;
     wordNavigator = wordNavigator ?? factory.Create<ITextStructureNavigator>().Object;
     undoRedoOperations = undoRedoOperations ?? factory.Create<IUndoRedoOperations>().Object;
     var mock = factory.Create<IVimTextBuffer>();
     mock.SetupGet(x => x.TextBuffer).Returns(textBuffer);
     mock.SetupGet(x => x.LocalSettings).Returns(localSettings);
     mock.SetupGet(x => x.GlobalSettings).Returns(localSettings.GlobalSettings);
     mock.SetupGet(x => x.Vim).Returns(vim);
     mock.SetupGet(x => x.WordNavigator).Returns(wordNavigator);
     mock.SetupGet(x => x.ModeKind).Returns(ModeKind.Normal);
     mock.SetupGet(x => x.UndoRedoOperations).Returns(undoRedoOperations);
     mock.SetupProperty(x => x.LastVisualSelection);
     mock.SetupProperty(x => x.LastInsertExitPoint);
     mock.SetupProperty(x => x.LastEditPoint);
     mock.Setup(x => x.SwitchMode(It.IsAny<ModeKind>(), It.IsAny<ModeArgument>()));
     return mock;
 }
开发者ID:Kazark,项目名称:VsVim,代码行数:30,代码来源:MockObjectFactory.cs


示例5: CreateVimTextBuffer

 /// <summary>
 /// Create a Mock over IVimTextBuffer which provides the msot basic functions
 /// </summary>
 public static Mock<IVimTextBuffer> CreateVimTextBuffer(
     ITextBuffer textBuffer,
     IVimLocalSettings localSettings = null,
     IVim vim = null,
     MockRepository factory = null)
 {
     factory = factory ?? new MockRepository(MockBehavior.Strict);
     vim = vim ?? CreateVim(factory: factory).Object;
     localSettings = localSettings ?? CreateLocalSettings(factory: factory).Object;
     var mock = factory.Create<IVimTextBuffer>();
     mock.SetupGet(x => x.TextBuffer).Returns(textBuffer);
     mock.SetupGet(x => x.LocalSettings).Returns(localSettings);
     mock.SetupGet(x => x.GlobalSettings).Returns(localSettings.GlobalSettings);
     mock.SetupGet(x => x.Vim).Returns(vim);
     mock.SetupProperty(x => x.LastVisualSelection);
     return mock;
 }
开发者ID:sehe,项目名称:VsVim,代码行数:20,代码来源:MockObjectFactory.cs


示例6: CreateVimBuffer

 public static Mock<IVimBuffer> CreateVimBuffer(
     ITextView textView,
     string name = null,
     IVim vim = null,
     IJumpList jumpList = null,
     IVimLocalSettings localSettings = null,
     IIncrementalSearch incrementalSearch = null,
     IMotionUtil motionUtil = null,
     ITextStructureNavigator wordNavigator = null,
     MockRepository factory = null)
 {
     factory = factory ?? new MockRepository(MockBehavior.Strict);
     name = name ?? "test";
     vim = vim ?? CreateVim().Object;
     jumpList = jumpList ?? (factory.Create<IJumpList>().Object);
     motionUtil = motionUtil ?? factory.Create<IMotionUtil>().Object;
     wordNavigator = wordNavigator ?? factory.Create<ITextStructureNavigator>().Object;
     localSettings = localSettings ?? new LocalSettings(vim.GlobalSettings);
     var vimTextBuffer = CreateVimTextBuffer(
         textView.TextBuffer,
         localSettings: localSettings,
         vim: vim,
         factory: factory);
     var mock = factory.Create<IVimBuffer>();
     mock.SetupGet(x => x.TextView).Returns(textView);
     mock.SetupGet(x => x.MotionUtil).Returns(motionUtil);
     mock.SetupGet(x => x.TextBuffer).Returns(() => textView.TextBuffer);
     mock.SetupGet(x => x.TextSnapshot).Returns(() => textView.TextSnapshot);
     mock.SetupGet(x => x.Name).Returns(name);
     mock.SetupGet(x => x.LocalSettings).Returns(localSettings);
     mock.SetupGet(x => x.GlobalSettings).Returns(localSettings.GlobalSettings);
     mock.SetupGet(x => x.MarkMap).Returns(vim.MarkMap);
     mock.SetupGet(x => x.RegisterMap).Returns(vim.RegisterMap);
     mock.SetupGet(x => x.JumpList).Returns(jumpList);
     mock.SetupGet(x => x.Vim).Returns(vim);
     mock.SetupGet(x => x.VimData).Returns(vim.VimData);
     mock.SetupGet(x => x.IncrementalSearch).Returns(incrementalSearch);
     mock.SetupGet(x => x.WordNavigator).Returns(wordNavigator);
     mock.SetupGet(x => x.VimTextBuffer).Returns(vimTextBuffer.Object);
     return mock;
 }
开发者ID:sehe,项目名称:VsVim,代码行数:41,代码来源:MockObjectFactory.cs


示例7:

 void IVimHost.VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
 {
     VimRcState = vimRcState;
 }
开发者ID:niklasi,项目名称:VsVim,代码行数:4,代码来源:MockVimHost.cs


示例8: OperationsImpl

 internal OperationsImpl(ITextView view, IEditorOperations opts, IOutliningManager outlining, IVimHost host, IJumpList jumpList, IVimLocalSettings settings, IUndoRedoOperations undoRedoOpts)
     : base(view, opts, outlining, host, jumpList, settings, undoRedoOpts)
 {
 }
开发者ID:ChrisMarinos,项目名称:VsVim,代码行数:4,代码来源:CommonOperationsTest.cs


示例9: 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


示例10: 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


示例11: 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


示例12: 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


示例13: 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


示例14: 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


示例15: 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


示例16: 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


示例17: 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


示例18: 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


示例19: 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


示例20: 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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IVimTextBuffer类代码示例发布时间:2022-05-24
下一篇:
C# IVimGlobalSettings类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap