예제 #1
0
        /// <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);
            _buffer = Vim.CreateVimBuffer(_textView);
            _globalSettings = _buffer.GlobalSettings;
            _localSettings = _buffer.LocalSettings;

            var operations = CommonOperationsFactory.GetCommonOperations(_buffer.VimBufferData);
            _insertUtilRaw = new InsertUtil(_buffer.VimBufferData, operations);
            _insertUtil = _insertUtilRaw;
        }
예제 #2
0
        /// <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;
        }
예제 #3
0
        /// <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. There are a few tests that rely on behavior from SelectionChangeTracker so they set
        /// the mode to Insert.
        /// </summary>
        /// <param name="lines"></param>
        protected virtual 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);
            var motionUtil = new MotionUtil(_vimBuffer.VimBufferData, operations);

            _insertUtilRaw = new InsertUtil(_vimBuffer.VimBufferData, motionUtil, operations);
            _insertUtil    = _insertUtilRaw;
        }
예제 #4
0
        /// <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 = EditorUtil.CreateTextView(lines);
            _buffer = EditorUtil.FactoryService.Vim.CreateVimBuffer(_textView);
            _globalSettings = _buffer.GlobalSettings;
            _localSettings = _buffer.LocalSettings;

            var operations = EditorUtil.FactoryService.CommonOperationsFactory.GetCommonOperations(_buffer.VimBufferData);
            _insertUtilRaw = new InsertUtil(_buffer.VimBufferData, operations);
            _insertUtil = _insertUtilRaw;
        }