Save/restore queries on close or manually
I'm a multitasker, and I usually have 7 or 8 (or 20) tabs open in LINQPad. When I need to restart my computer, or for whatever reason close LINQPad, I could to save each of my queries (coming up with a meaningful name for each), remember which ones I had open, and reopen them one by one when I restart, but I find it's quicker and easier to just kill LINQPad with Task Manager so that it will offer to reload all my tabs for me automatically. I would be nice if LINQPad had the option to save and restore all queries on close/start, and/or the option to save and reload a group of queries at will.
I need some feedback on this feature. First:
(a) Would you expect it to apply only to untitled queries? Or:
(b) Would you also expect it to apply to saved queries that were modified?
(The reason I ask is that option (a) is simple to implement, whereas option (b) creates numerous complications.)
Of course, it would be nice to have it like (b) in the way Notepad++ it does. But - in my point of view - the difference between (a) and (b) is more like a 90% and 100% solution. To get the feature faster, (a) will be a great step.
Moreover, on a quick estimate and not knowing anything about Linqpad internals, I can't see why (b) is a much bigger step. On close, save all files as they are in a temporary location. On load check, if the origin file is deleted or is different from temp -> file must be marked as unsaved; otherwise not.
I also do this by killing the Linqpad-process, please add this feature.
Mike D. commented
Notepad ++ does this and it is very handy. Please implement!
Please, please, please. I'd buy LINQPad again just for this feature.
This would make Linqpad literally the best thing ever.
Adam C commented
I quite often have 8-10 unsaved scratch queries as well but every so often killing the process loses the scratch queries.
Additionally, I want all queries restored on load, not just the unsaved one's.
Notepad++ is a great example of this functionality.
We use LINQPad for measurement automation among other things (kicks LabView's ass!). I typically have a query that controls my function generator, another one grabs an oscilloscope screenshot, another one pulls an S11 sweep from a network analyzer and so on.
These queries are all unnamed. I'll usually start with a saved query that has the basic functionality and tweak it for the task at hand.
Often, such queries are only relevant for a few days while I'm working on a problem. Then they can be thrown away. Autosave would be great, since then I wouldn't have to think of a name and location for each of these.
I would like it to work like my oscilloscope: just push the power button to turn it off. No questions. When I turn it on again, I'm back to what I was doing.
Sublime Text works like that and I love it. No questions when closing the program. It only asks if you are closing a specific file.
This would be a brilliant time saver.
Josh Buedel commented
Notepad++ does this. In the options it is called "Enable session snapshot and periodic backup", and is quite helpful. Unsaved tabs just open right back up. Very convenient.
Exactly the same for me, it would be nice when it behaves like sublime text, just keep them "open" for next session" e.g. linqpad saves them for us to come back to until we close them explicitly...
Chris Berger commented
I know it's cliche, but I felt the need to add this: http://cdn.memegenerator.net/instances/500x/44672582.jpg
Drew Noakes commented
Came here to say this. I would love this feature. I've taken to closing LINQPad from Task Manager so that when I reopen it, my query tabs are back to how they were when I left off. Please add this feature! The autosave/restore stuff is already there, so hopefully it's just a config setting and UI change.