7

There's a great feature in Notepad++, that you can open several new tab/editor, like temp editors and when closing the whole editor app, it doesn't ask to save the new unsaved tabs. The app knows to restore the app next time with all the temp tabs.

This feature is great when trying to figure out a problem and you want to paste several log snippets. You don't want to save them as files and you don't want to loose them if you need to restart (power outage or battery drain).

So, is there a Linux app that has this feature?

So far I've tried geany, gedit and kedit and couldn't find this feature in them.

Zanna
  • 70,465

2 Answers2

11

Atom totally does this :) By default it always opens with all the tabs from the last session, whether or not they have been saved, with no need to explicitly set this feature.

Here I just launched atom and it opens with all tabs from the previous session, including unsaved tabs:

If atom is already open and you launch a new instance, it will be blank and if you have more than one atom window open, and close all of them, when you launch atom again, it will return to the session that was closed last.

It has lots of other awesome features too. You can get it from this ppa:

sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom

or download the .deb package from the website (the file is actually called deb)

wget https://atom.io/download/deb
sudo dpkg -i deb

Thanks to @cat for reminding me to mention that Atom is FOSS (free as in speech and free as in beer). It's MIT licensed and is in active development on GitHub

Documentation main page here with lots of how-tos

Enjoy!

Zanna
  • 70,465
  • I don't see that you have unsaved new tabs (all the tabs are files in the file system). Does it work with new tabs as well? – AlikElzin-kilaka Jul 26 '16 at 08:06
  • @AlikElzin-kilaka yes it still works if the tabs are unsaved new files... I will make a new picture... – Zanna Jul 26 '16 at 08:12
  • Just tried Atom now, opened 2 new tabs with a few chars on each. After closing and reopening the app, all tabs disappeared :( Is there a setting I need to set? – AlikElzin-kilaka Jul 26 '16 at 09:42
  • @AlikElzin-kilaka I don't remember setting anything, it saves everything for me. But I've been using for a while... I will check the settings when I'm back at home. – Zanna Jul 26 '16 at 09:44
  • Hooray for atom! @AlikElzin-kilaka You may need to look around the settings, hit CTRL-COMMA. – cat Jul 26 '16 at 10:50
  • 1
    You should include that Atom is FOSS under an MIT-style license, and how it can be found in active development on github. – cat Jul 26 '16 at 10:53
  • @cat - couldn't find a settings to auto-restore unsaved tabs. Do you know of such? If not, it seems that Atom doesn't have this feature. – AlikElzin-kilaka Jul 26 '16 at 11:15
  • @AlikElzin-kilaka It works out of the box for me. Perhaps try using the .deb on https://atom.io? – cat Jul 26 '16 at 11:58
  • You mean it overwrites files without yur consent? – Tulains Córdova Jul 26 '16 at 12:44
  • @AlikElzin-kilaka I can't reproduce your problem except by opening a new instance of atom without closing the first one... it always opens with the tabs from the last session, saved or not :S – Zanna Jul 26 '16 at 13:15
  • @Zanna - perhaps that's the key. Somehow Atom thinks I already have an opened instance and creates a new one from scratch. Following this lead, I tried to look at the opened processes after closing Atom, and cannot see atom ones. – AlikElzin-kilaka Jul 27 '16 at 08:57
  • what happens if after closing you do pkill atom? – Zanna Jul 27 '16 at 09:07
  • It seems there's a setting that need to be set, called "Back Up Before Saving". It works for a while but then stops. There's an issue on the subject: https://github.com/atom/atom/issues/10044 – AlikElzin-kilaka Jul 28 '16 at 00:45
  • That setting is off for me @AlikElzin-kilaka but still does what you want – Zanna Jul 28 '16 at 04:18
  • 1
    As of right now, this does not seem to work and something that may be related is tracked here. I suppose it may still work with projects but that's obviously not what the OP asked for. – AndyO May 19 '20 at 13:11
1

Sublime Text has this feature, and it is enabled by default.

To be honest, I haven't tried the Linux version of Sublime Text, only the Windows one, but I assume it will work the same. (I just saw this question in the sidebar in another Stack Exchange.)

dan-gph
  • 141