Show line numbers in gedit

The Preferences menu was missing under “Edit” in my installation of gedit in Ubuntu 15.10. To enable it, run:

sudo apt-get install indicator-appmenu
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides '@a{sv} {"Gtk/ShellShowsAppMenu": <int32 0>}'

Reopen Gedit. Now Edit>Preferences