7

In 16.04 with Unity I have (gedit - Version 3.18.3) Which has the preference menu shown below:

enter image description here

As you can see, there are a number of useful options here, the one I miss the most is Display line numbers. This is unavailable on 18.04 with Gnome (gedit - Version 3.28.1) much to my annoyance as seen below.

enter image description here

4 Answers 4

7
  1. 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.

  2. Select Preferences from the Text Editor dropdown menu.

  3. In the Gedit Preferences window click the View tab.

  4. 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.

    enter image description here
    Clicking ▾ + Display line numbers in the lower right corner displays line numbers for the tab that has focus only.

1
  • Thank you for making it abundantly clear. vandiums answer got me there as well.
    – Elder Geek
    Commented Sep 20, 2018 at 18:05
5

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".

enter image description here


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.

enter image description here

Then re-login or restart GNOME shell to be sure and you should see something like this:

enter image description here

3

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.

1
  • 1
    Sigh. Just another Gnome annoyance to deal with. I've never used a less intuitive DE.
    – Elder Geek
    Commented Sep 20, 2018 at 17:58
1

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

1
  • 1
    You digged deep ;) It is in the app menu, see my answer.
    – vanadium
    Commented Sep 20, 2018 at 15:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .