views:

11

answers:

1

I want to create a simple extension which modifies text buffers based on a command. No sample, documentation or template that I've found so far explains anything about working with text buffers. Anyone got a clue how to do this?

What I want to end up with is a format selection/document extension for text files, that wrap content around 72 characters per line.

+1  A: 

I found this extension together with sample very helpful, and now I have something which works. Though it was very counter intuitive at first, I was trying to get the at the code window while this example instead uses a command filter to fiddle with the text view by extending the editor.

The ITextView interface provides access to the text in the editor, you can access the Buffer through that and make changes that way.

John Leidegren