Nedit stopped working on my iMac running High Sierra 10.13.4
Looks from your comment that your display variable is not set. Ensure you have an X-Server running (I. E. XQuartz) and then set your display environment variable first with:

export DISPLAY=:0


Launching applications from within the XQuartz terminal will have the $DISPLAY env var set automatically. You can make this change persist by adding that line to your ~/.profile or ~/.bash_profile file:

echo 'export DISPLAY=:0' &gt;&gt; ~/.profile


Note that in my setup, XQuartz automatically sets $DISPLAY for me without my needing to do this, so you may want to re-install XQuartz.(Or ask a follow-up question about why that behavior isn't working)