Display error when running NEdit
You'll need a display server running to run NEdit. Make sure that NEdit is installed and configured correctly. Here's a step by step guide that you can follow to do so. This should work on any recent release of macOS. I have followed the steps on a Mac running macOS Mojave 10.14.5.


Install XQuartz (display server) which NEdit requires to run. Run the following command to install XQuartz via Homebrew:

brew cask install xquartz

Skip if you already have it installed.
Install NEdit along with all of it's dependencies by running the following command:

brew install nedit
After successfully installing the two, run XQuartz.app. You can find it under Other folder in Launchpad, in /Applications/Utilities folder in Finder, or simply via Spotlight search. Here's how to identify it:


In the XQuartz Menu bar, click on Applications → Customize...


You will be presented with X11 Application Menu window as shown:


Click on Add Item button and create an entry for NEdit as shown:


Now close the X11 Application Menu window. Go the XQuartz menu, click on Applications item and you'll see an entry named NEdit (the one you just created).


Click on the entry to run NEdit :)