10

Is there an easy way using Avalon edit to highlight matching brackets and other characters like {}""?

Lee
  • 7,216
  • 13
  • 48
  • 82

1 Answers1

5

AvalonEdit can't do that on its own - you will have to write the feature yourself.

You will have to find the matching bracket yourself (which is no trivial task, if your language supports comments, string constants etc.). Then you will have to apply the transformation to the text (see this article, section Line Transformers), and of course remove it manually when it is no longer necessary.

Update:

The lead SharpDeveloper discusses it here: http://community.sharpdevelop.net/forums/p/12352/33648.aspx http://community.sharpdevelop.net/forums/p/10312/28488.aspx

Jeremy Thompson
  • 52,213
  • 20
  • 153
  • 256
Matěj Zábský
  • 16,050
  • 14
  • 64
  • 110
  • http://www.digitalrune.com/Products/TextEditorControl.aspx is an open source control based on the Win Forms control that Sharp Develop used to use. Perhaps, it would be relatively easy for me to take the functionality accross? – Lee Dec 09 '11 at 22:17
  • @lee no the DigitalRunes is based of the ISCharpCode.TextEditor - the winforms version. It wont plug into WPF, the opposite is possible: http://stackoverflow.com/questions/14170165/how-can-i-add-this-wpf-control-into-my-winform – Jeremy Thompson May 06 '13 at 05:32