4

I'm used to eclipse's and notepad++'s behavior of automatically opening the files and tabs present on last exit. Does anyone know if there is a way to enable this in Gedit? The session management plugin that I'm using seems to require explicit menu selection of load and save in order to retrieve a session. Anyone know if there's a way to automatically restore the last session or to choose a default session?

Thanks.

user508546
  • 421
  • 5
  • 12

5 Answers5

3

For gedit 3.10 (included in Ubuntu 14.04) use this plugin: https://github.com/raelgc/gedit-restore-tabs. In case ~/.local/share/gedit/plugins/ does not exist. Please create using mkdir -p ~/.local/share/gedit/plugins/

jpillora
  • 5,194
  • 2
  • 44
  • 56
Rael Gugelmin Cunha
  • 3,327
  • 30
  • 25
  • Unfortunately it does not work under F22 with GEdit 3.16.4 anymore. Only opened a tab where it said it couldn't handle such location and a new tab, instead of the one tab I had open in the last session. – Zelphir Kaltstahl Oct 01 '16 at 00:29
3

There is a Session Saver plugin available in gedit-plugins package. Look at http://live.gnome.org/GeditPlugins

rawonstack
  • 393
  • 4
  • 11
  • 2
    You can find useful those two as well: 1. http://code.google.com/p/reopen-tabs-gedit-plugin/ 2. http://sourceforge.net/projects/geditautosaves/ – rawonstack Dec 02 '10 at 16:34
  • 3
    Looks like the page has moved to here: https://wiki.gnome.org/Apps/Gedit/PluginsOld (?) – Ponkadoodle Jun 27 '14 at 21:30
1

One more soulution https://github.com/disfated/gedit-plugin-reopen-tabs

disfated
  • 10,633
  • 12
  • 39
  • 50
1

I've been very happy with https://github.com/jefferyto/gedit-ex-mortis, which can automatically restore windows, including all tabs, between sessions (you just have to enable the option in Preferences). It requires gedit 3.12 or newer, and works great for me on version 3.36.

Lee D
  • 116
  • 3
0

You can use a third-party gedit plugin: https://wiki.gnome.org/Apps/Gedit/ThirdPartyPlugins

Depending on your gedit version, I know about these plugins that can help you: Ex-Mortis, Restore Tabs and Session Saver.

For gedit 41.0 on Ubuntu 22.04 I use Ex-Mortis

  1. Download the latest release and extract: https://github.com/jefferyto/gedit-ex-mortis/releases/latest

  2. Copy plugin files:

mkdir -p ~/.local/share/gedit/plugins
cp -r ex-mortis ~/.local/share/gedit/plugins
cp ex-mortis.plugin ~/.local/share/gedit/plugins
  1. Restart gedit, then activate the plugin in the Plugins tab in gedit's Preferences window.

  2. Activate "Restore windows between sessions" from Ex-Mortis plugin's Preferences.

  3. Restart gedit again.

sotirov
  • 133
  • 7