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

C# IVimGlobalSettings类代码示例

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

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



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

示例1: Initialize

 internal static void Initialize(IVimGlobalSettings globalSettings, IVimApplicationSettings vimApplicationSettings)
 {
     var settingsSource = new SettingsSource(vimApplicationSettings);
     globalSettings.AddCustomSetting(UseEditorIndentName, UseEditorIndentName, settingsSource);
     globalSettings.AddCustomSetting(UseEditorDefaultsName, UseEditorDefaultsName, settingsSource);
     globalSettings.AddCustomSetting(UseEditorTabAndBackspaceName, UseEditorTabAndBackspaceName, settingsSource);
 }
开发者ID:aesire,项目名称:VsVim,代码行数:7,代码来源:VsVimHost.cs


示例2: CreateLocalSettings

 internal static Mock<IVimLocalSettings> CreateLocalSettings(
     IVimGlobalSettings global = null)
 {
     global = global ?? CreateGlobalSettings().Object;
     var mock = new Mock<IVimLocalSettings>(MockBehavior.Strict);
     mock.SetupGet(x => x.GlobalSettings).Returns(global);
     return mock;
 }
开发者ID:ameent,项目名称:VsVim,代码行数:8,代码来源:MockObjectFactory.cs


示例3: CreateLocalSettings

 public static Mock<IVimLocalSettings> CreateLocalSettings(
     IVimGlobalSettings global = null,
     MockRepository factory = null)
 {
     factory = factory ?? new MockRepository(MockBehavior.Strict);
     global = global ?? CreateGlobalSettings(factory: factory).Object;
     var mock = factory.Create<IVimLocalSettings>(MockBehavior.Strict);
     mock.SetupGet(x => x.GlobalSettings).Returns(global);
     return mock;
 }
开发者ID:gimac,项目名称:VsVim,代码行数:10,代码来源:MockObjectFactory.cs


示例4: VimTest

        protected VimTest()
        {
            _factory = new MockRepository(MockBehavior.Strict);
            _globalSettings = new GlobalSettings();
            _fileSystem = _factory.Create<IFileSystem>(MockBehavior.Strict);
            _bufferFactory = VimBufferFactory;
            _simpleListener = new SimpleListener();
            var creationListeners = new [] { new Lazy<IVimBufferCreationListener>(() => _simpleListener) };

            var map = new Dictionary<string, VariableValue>();
            _keyMap = new KeyMap(_globalSettings, map);
            _vimHost = _factory.Create<IVimHost>(MockBehavior.Strict);
            _vimHost.Setup(x => x.CreateHiddenTextView()).Returns(CreateTextView());
            _vimHost.Setup(x => x.AutoSynchronizeSettings).Returns(true);
            _vimRaw = new Vim(
                _vimHost.Object,
                _bufferFactory,
                CompositionContainer.GetExportedValue<IVimInterpreterFactory>(),
                creationListeners.ToFSharpList(),
                _globalSettings,
                _factory.Create<IMarkMap>().Object,
                _keyMap,
                MockObjectFactory.CreateClipboardDevice().Object,
                _factory.Create<ISearchService>().Object,
                _fileSystem.Object,
                new VimData(_globalSettings),
                _factory.Create<IBulkOperations>().Object,
                map,
                new EditorToSettingSynchronizer());
            _vim = _vimRaw;
            _vim.AutoLoadVimRc = false;
        }
开发者ID:louisfeng,项目名称:VsVim,代码行数:32,代码来源:VimTest.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: 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


示例7: VimTest

        public VimTest()
        {
            _factory = new MockRepository(MockBehavior.Strict);
            _globalSettings = new GlobalSettings();
            _markMap = _factory.Create<IMarkMap>(MockBehavior.Strict);
            _fileSystem = _factory.Create<IFileSystem>(MockBehavior.Strict);
            _bufferFactory = VimBufferFactory;

            var map = new Dictionary<string, VariableValue>();
            _keyMap = new KeyMap(_globalSettings, map);
            _vimHost = _factory.Create<IVimHost>(MockBehavior.Strict);
            _searchInfo = _factory.Create<ISearchService>(MockBehavior.Strict);
            _vimRaw = new Vim(
                _vimHost.Object,
                _bufferFactory,
                FSharpList<Lazy<IVimBufferCreationListener>>.Empty,
                _globalSettings,
                _markMap.Object,
                _keyMap,
                MockObjectFactory.CreateClipboardDevice().Object,
                _searchInfo.Object,
                _fileSystem.Object,
                new VimData(),
                _factory.Create<IBulkOperations>().Object,
                map);
            _vim = _vimRaw;
            _vim.AutoLoadVimRc = false;
        }
开发者ID:fpicalausa,项目名称:VsVim,代码行数:28,代码来源:VimTest.cs


示例8: KeyMapTest

 public KeyMapTest()
 {
     _globalSettings = new GlobalSettings();
     _variableMap = new Dictionary<string, VariableValue>();
     _mapRaw = new KeyMap(_globalSettings, _variableMap);
     _map = _mapRaw;
 }
开发者ID:wmchristie,项目名称:VsVim,代码行数:7,代码来源:KeyMapTest.cs


示例9: HostFactoryTest

        protected HostFactoryTest()
        {
            _globalSettings = Vim.GlobalSettings;
            _protectedOperations = new TestableProtectedOperations();
            _mockFactory = new MockRepository(MockBehavior.Strict);
            _synchronizer = _mockFactory.Create<IEditorToSettingsSynchronizer>(MockBehavior.Strict);
            _vsEditorAdaptersFactoryService = _mockFactory.Create<IVsEditorAdaptersFactoryService>();
            _vimApplicationSettings = _mockFactory.Create<IVimApplicationSettings>(MockBehavior.Loose);

            var vsAdapter = _mockFactory.Create<IVsAdapter>();
            vsAdapter.SetupGet(x => x.EditorAdapter).Returns(_vsEditorAdaptersFactoryService.Object);

            _hostFactory = new HostFactory(
                Vim,
                _vsEditorAdaptersFactoryService.Object,
                _mockFactory.Create<IDisplayWindowBrokerFactoryService>(MockBehavior.Loose).Object,
                _mockFactory.Create<ITextManager>(MockBehavior.Loose).Object,
                vsAdapter.Object,
                _protectedOperations,
                new VimBufferCoordinatorFactory(Vim),
                _mockFactory.Create<IKeyUtil>(MockBehavior.Loose).Object,
                _synchronizer.Object,
                _vimApplicationSettings.Object,
                new Lazy<ICommandTargetFactory, IOrderable>[] { });
        }
开发者ID:aesire,项目名称:VsVim,代码行数:25,代码来源:HostFactoryTest.cs


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


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


示例12: Create

        protected void Create(bool insertMode, params string[] lines)
        {
            _factory = new MockRepository(MockBehavior.Strict);
            _factory.DefaultValue = DefaultValue.Mock;
            _textView = CreateTextView(lines);
            _textBuffer = _textView.TextBuffer;
            _vim = _factory.Create<IVim>(MockBehavior.Loose);
            _editorOptions = _factory.Create<IEditorOptions>(MockBehavior.Loose);
            _textChangeTracker = _factory.Create<ITextChangeTracker>(MockBehavior.Loose);
            _textChangeTracker.SetupGet(x => x.CurrentChange).Returns(FSharpOption<TextChange>.None);
            _undoRedoOperations = CreateUndoRedoOperations();
            _wordCompletionSessionFactoryService = _factory.Create<IWordCompletionSessionFactoryService>();

            var localSettings = new LocalSettings(Vim.GlobalSettings);
            _vimBuffer = Vim.CreateVimBuffer(_textView);
            _globalSettings = _vimBuffer.GlobalSettings;
            var vimTextBuffer = Vim.GetOrCreateVimTextBuffer(_textView.TextBuffer);
            var vimBufferData = CreateVimBufferData(vimTextBuffer, _textView);
            _operations = CommonOperationsFactory.GetCommonOperations(vimBufferData);
            _broker = _factory.Create<IDisplayWindowBroker>();
            _broker.SetupGet(x => x.IsCompletionActive).Returns(false);
            _broker.SetupGet(x => x.IsQuickInfoActive).Returns(false);
            _broker.SetupGet(x => x.IsSignatureHelpActive).Returns(false);
            _broker.SetupGet(x => x.IsSmartTagSessionActive).Returns(false);
            _insertUtil = _factory.Create<IInsertUtil>();
            _motionUtil = _factory.Create<IMotionUtil>();
            _commandUtil = _factory.Create<ICommandUtil>();
            _capture = _factory.Create<IMotionCapture>();

            // Setup the mouse.  By default we say it has no buttons down as that's the normal state
            _mouseDevice = _factory.Create<IMouseDevice>();
            _mouseDevice.SetupGet(x => x.IsLeftButtonPressed).Returns(false);

            // Setup the keyboard.  By default we don't say that any button is pressed.  Insert mode is usually
            // only concerned with arrow keys and we will set those up as appropriate for the typing tests
            _keyboardDevice = _factory.Create<IKeyboardDevice>();
            _keyboardDevice.Setup(x => x.IsArrowKeyDown).Returns(false);

            _modeRaw = new global::Vim.Modes.Insert.InsertMode(
                _vimBuffer,
                _operations,
                _broker.Object,
                _editorOptions.Object,
                _undoRedoOperations,
                _textChangeTracker.Object,
                _insertUtil.Object,
                _motionUtil.Object,
                _commandUtil.Object,
                _capture.Object,
                !insertMode,
                _keyboardDevice.Object,
                _mouseDevice.Object,
                WordUtil,
                _wordCompletionSessionFactoryService.Object);
            _mode = _modeRaw;
            _mode.OnEnter(ModeArgument.None);
            _mode.CommandRan += (sender, e) => { _lastCommandRan = e.CommandRunData; };
        }
开发者ID:kri4er,项目名称:VsVim,代码行数:58,代码来源:InsertModeTest.cs


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


示例14: Create

 private void Create(params string[] lines)
 {
     _globalSettings = Vim.GlobalSettings;
     _vimBuffer = CreateVimBuffer(lines);
     _textView = (IWpfTextView)_vimBuffer.TextView;
     _textBuffer = _vimBuffer.TextBuffer;
     _commonOperationsRaw = (CommonOperations)CommonOperationsFactory.GetCommonOperations(_vimBuffer.VimBufferData);
     _commonOperations = _commonOperationsRaw;
 }
开发者ID:jaredpar,项目名称:VsVim,代码行数:9,代码来源:CommonOperationsIntegrationTest.cs


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


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


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

 public void Create(params string[] lines)
 {
     _vimBuffer = CreateVimBuffer(lines);
     _textView = _vimBuffer.TextView;
     _globalSettings = _vimBuffer.LocalSettings.GlobalSettings;
     _globalSettings.IncrementalSearch = true;
     _globalSettings.WrapScan = true;
     _search = _vimBuffer.IncrementalSearch;
     _taggerSourceRaw = new IncrementalSearchTaggerSource(_vimBuffer);
     _taggerSource = _taggerSourceRaw;
 }
开发者ID:rschatz,项目名称:VsVim,代码行数:11,代码来源:IncrementalSearchTaggerSourceTest.cs


示例19: Create

 protected void Create(params string[] lines)
 {
     _vimBuffer = CreateVimBuffer(lines);
     _textView = _vimBuffer.TextView;
     _textBuffer = _vimBuffer.TextBuffer;
     _globalSettings = _vimBuffer.GlobalSettings;
     _globalSettings.SelectModeOptions = SelectModeOptions.Mouse | SelectModeOptions.Keyboard;
     _textSelection = _textView.Selection;
     _context = new TestableSynchronizationContext();
     _context.Install();
 }
开发者ID:kcprogrammer,项目名称:VsVim,代码行数:11,代码来源:SelectModeIntegrationTest.cs


示例20: Create

 public void Create(params string[] lines)
 {
     _textView = EditorUtil.CreateTextView(lines);
     _buffer = EditorUtil.FactoryService.Vim.CreateBuffer(_textView);
     _globalSettings = _buffer.LocalSettings.GlobalSettings;
     _globalSettings.IncrementalSearch = true;
     _globalSettings.WrapScan = true;
     _search = _buffer.IncrementalSearch;
     _taggerRaw = new IncrementalSearchTagger(_buffer);
     _tagger = _taggerRaw;
 }
开发者ID:junkshow,项目名称:VsVim,代码行数:11,代码来源:IncrementalSearchTaggerTest.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IVimLocalSettings类代码示例发布时间:2022-05-24
下一篇:
C# IVimData类代码示例发布时间: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