AvaloniaUI / AvaloniaEdit

Avalonia-based text editor (port of AvalonEdit)
MIT License
702 stars 138 forks source link

Demonstrate how to use text snippets #418

Closed mgarstenauer closed 2 months ago

mgarstenauer commented 2 months ago

This PR adds an Insert Snippet button that inserts a text snippet at the caret position.

The snippets insert the text

public class Name
{
    public Name()
    {
        |
    }
}

where Name is a replaceable text part. When the class name is changed, the constructor name is automatically updated. When done, the caret is placed inside the constructor body.

This should help newcomers to get started with text snippets.