Things I learned building a text editor for the terminal
TextArea
is the latest widget to be added to Textual's growing collection.
It provides a multi-line space to edit text, and features optional syntax highlighting for a selection of languages.
Adding a TextArea
to your Textual app is as simple as adding this to your compose
method:
Enabling syntax highlighting for a language is as simple as:
Working on the TextArea
widget for Textual taught me a lot about Python and my general
approach to software engineering. It gave me an appreciation for the subtle functionality behind
the editors we use on a daily basis — features we may not even notice, despite
some engineer spending hours perfecting it to provide a small boost to our development experience.
This post is a tour of some of these learnings.