How can I adjust preferences for gedit that no longer appear in the preferences menu in Ubuntu 18.04
Open Gedit and click the dropdown triangle to the right of where it says Text Editor in the upper left corner of the desktop next to Activities.
Select Preferences from the Text Editor dropdown menu.
In the Gedit Preferences window click the View tab.
-
In the Gedit Preferences window check the first option that says Display line numbers which is marked by the mouse cursor in the below screenshot.
Clicking ▾ + Display line numbers in the lower right corner displays line numbers for the tab that has focus only.
If you just want to display line numbers, click the cursor position indicator in the status bar at the bottom (which looks like "Ln x, Col y") and check "Display line numbers".
As mentioned in the answers by @vanadium and @karel, the "Preferences" option has been moved to the "App Menu" in the top bar next to "Activities". But if you wish you can bring it back to the application window using (GNOME) Tweaks to get a behaviour closer to the older release.
Launch Tweaks and go to the "Top Bar" section. Then toggle the "Application Menu" option OFF.
Then re-login or restart GNOME shell to be sure and you should see something like this:
The dialog you are looking for is now - confusingly - found under the App menu. That is the menu that appears when you click the application name in the top bar of the Ubuntu 18.04 desktop, which is an adapted version of the Gnome Shell desktop. It is designed to provide options that apply to application environment.
As you experienced yourself, the design might not be that fortunate. Rumours are that Gnome Shell developpers are planning to move that menu back inside the application window.
With some digging I discovered that the command
gsettings set org.gnome.gedit.preferences.editor display-line-numbers true
does the trick to turn the line numbers on. Other gedit preferences can also be adjusted. The command
gsettings list-recursively | grep gedit
will provide you with a list of options.
References:
https://howto8165.wordpress.com/2015/11/25/how-to-change-hidden-preferences-for-gedit/
configure gedit to always open in new window