Leafpad is a lightweight GUI and open source text editor for Linux operating systems. I use Leafpad mostly to edit text files and I particularly enjoy the unlimited undo/redo feature when working with large files.
To install Leafpad on Ubuntu or any other Debian family distro, simply open a terminal window and type:
sudo apt install leafpad
for more details, visit Leafpad