If you are looking for a good gedit alternativevre, have a look at meditation text editor As a replacement for Gedit! i am using xfce4 Without desktop manager and gnome, gedit (GNOME text editor) does not display correctly. It’s actually quite ugly. Simply remove gedit and replace carefully (pictured below). See also sublime text as a good option.
For Arch Linux just do:
pacman -R gedit then pacman -S medit
For Debian/Ubuntu use:
apt install medit
See also: Best Linux Distro for Desktop