Exemplo n.º 1
0
        private static void InsertBlackLineBefore()
        {
            int        line, col;
            VSTextView textView = new VSTextView(VSTextView.ActiveTextView);

            textView.GetCursorPositon(out line, out col);
            textView.InsertText("\r\n", line, 0);
            textView.MoveCursorTo(line, textView.GetStartTextIndexOfCurrLine());
        }
Exemplo n.º 2
0
 private static void InsertPair(string pair)
 {
     if (BaseUCSetting.SettingModel.AutoBraceModel.OpenAutoBrace)
     {
         int        currentLineIndex, currentColIndex;
         VSTextView textview = new VSTextView(VSTextView.ActiveTextView);
         textview.GetCursorPositon(out currentLineIndex, out currentColIndex);
         textview.InsertText(pair, currentLineIndex, currentColIndex);
         textview.MoveCursorTo(currentLineIndex, currentColIndex);
     }
 }