Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

[VB]Working With Lines in a VSIX Extension

$
0
0

I am very new to writing VSIX Extensions, and am currently working on figuring out how to examine & edit the text in the editor. At the moment, I have managed to figure out how to get the following:

Dim CurrentLine As String = view.Caret.Position.BufferPosition.GetContainingLine().GetText()
Dim CurrentChar As Char = view.Caret.Position.BufferPosition.GetChar()
Dim CurrentIndex As Integer = view.Caret.Position.BufferPosition.Position
Dim CurrentLineIndex As Integer = view.Caret.Position.BufferPosition.GetContainingLine().LineNumber

Some of the things I am trying to figure out how to do/get are:

1. Other lines based on the CurrentLineIndex
2. Column & Character position of view.Caret (the values displayed in the Status Bar as Col & Ch)
3. Move view.Caret to a new position

Any help would be appreciated. Thanks.


Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>