Author Topic: Start Occasionally With No Restore  (Read 4171 times)

cthomson

  • Community Member
  • Posts: 14
  • Hero Points: 0
Start Occasionally With No Restore
« on: March 31, 2014, 08:01:07 pm »
I would love to be able to use SlickEdit for all my editing needs but for years I have been trying to get it to restore workspaces/projects when I'm working on a large project but allow me to open individual files for quick editing without restoring or modifying existing workspaces (yet still having all other configuration options such as keyboard mapping).  I have searched again today and find plenty of cases of others with the same need but no satisfactory solution.  A simple command line (invocation) option would seem to be the easiest solution.  Will the -snorestore in recent versions do what I need?  I have not upgraded from 2009 (14.x) because there were no new features that I needed but that one invocation option would make it worthwhile.

I have tried the "use two different configurations with shortcuts" option but it doesn't work 100% and it leaves the mess of two configurations that tend to get out of sync.

Comments in the source code of restore.e include the comment "The N option indicates that files are not being restored.  This occurs when the user specifies a file argument from the command line."  This would be ideal! Restore workspace and files when there are no filenames specified on the vs.exe command line, restore configuration without workspace or files and open only the files specified when the vs.exe command line contains filenames.  Unfortunately it doesn't actually work that way.

Can anyone offer suggestions?  I'm getting tired of having to use a secondary editor like Boxer for editing text files that are not part of a project.


Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Start Occasionally With No Restore
« Reply #1 on: March 31, 2014, 08:35:02 pm »
You have to be very careful with -snorestore. That will bring up a bare-bones editor (no toolbars, no tool windows, etc) with just the files you have specified on the command line. That may be what you want for those "use SE instead of notepad" cases, but you will most likely want to also add the -snoconfig invocation option. This prevents that bare-bones state from being saved into your config as your preferred settings. And there's no need for having two configurations this way. Your preferences for keyboard emulation, etc will still be read in, but changes you make won't trash your "normal usage" config. (I use this approach to set up SlickEdit as the SVN_EDITOR on *nix platforms via an alias).

Another option that you have is to simply turn off the "Restore Workspace" setting. When you fire up SE, it won't restore the workspace you had open last time, and you'll have to open it manually from the history menu.

And a Heads-Up on using shortcuts to use separate configs. That approach usually works quite well, but it's easy to forget to add the +new invocation option. And without +new, an already-running editor will be activated instead of creating a new second instance.

cthomson

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: Start Occasionally With No Restore
« Reply #2 on: March 31, 2014, 08:58:06 pm »
Thank you for the information.  I really don't want something as bare-bones as -snorestore, I would prefer my full SlickEdit configuration just with only the files specified on the command line and without the last workspace/project and files.  I still want the ability to have a desktop shortcut that will automatically restore the workspace as it always has but I would settle for having to manually reopen the workspace if that was my only option.

As you so astutely pointed out, I really want a dual-personality editor that can be used both as a project environment and as a simple notepad replacement.

I tried turning off the "Auto restore workspace files" option but that doesn't appear to have any effect at all unless I also turn off "Auto restore files".  I load a workspace, change the option, close the editor then re-open it without any command line options and there's my workspace again.  Am I missing something?


Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Start Occasionally With No Restore
« Reply #3 on: March 31, 2014, 09:05:55 pm »
You will want to turn off "Auto restore files" and "Auto restore workspace", but leave "Auto restore workspace files" on. This will prevent SE from auto loading the workspace, as well as any files that were opened without an active workspace. Then when you reopen a workspace, the files you had open the last time that workspace was active will be restored.

cthomson

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: Start Occasionally With No Restore
« Reply #4 on: March 31, 2014, 09:10:30 pm »
That's tremendous!  Unfortunately, I don't have those options.  I have "Auto restore files" and "Auto restore workspace files" but no "Auto restore workspace" option.  Perhaps that came in a more recent version?  As I said, I would be willing to spend the money on an upgrade if I could get the ability to choose to open workspaces or not.

Besides, doesn't turning off "auto restore workspace files" mean that when I manually switch between workspaces, it won't restore the files, cursor position, etc. from the last time I worked on that other project?

« Last Edit: March 31, 2014, 09:13:33 pm by cthomson »

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Start Occasionally With No Restore
« Reply #5 on: March 31, 2014, 09:14:07 pm »
I recommend you download the latest trial version so you can have 2 weeks to give those options a spin to see if it'll meet your needs.

I don't recall exactly what version we tweaked those Auto Restore options, but it's been in there since a least 2012 (the oldest version I've got ready-to-hand to test with right now).

cthomson

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: Start Occasionally With No Restore
« Reply #6 on: March 31, 2014, 09:20:21 pm »
You're too quick. ;D

I went back and added the comment "Besides, doesn't turning off "auto restore workspace files" mean that when I manually switch between workspaces, it won't restore the files, cursor position, etc. from the last time I worked on that other project?" after posting.  Is that the case?  I would still like the ability to switch between workspaces and be able to pick up where I left off.  We're a very small shop so it's not unusual to have multiple projects going at once.

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Start Occasionally With No Restore
« Reply #7 on: March 31, 2014, 09:45:56 pm »
Quote
Besides, doesn't turning off "auto restore workspace files" mean that when I manually switch between workspaces, it won't restore the files, cursor position, etc. from the last time I worked on that other project?
Correct, which is why I said you should leave that option turned on. In my preferred config that's actually the only auto-restore option I have on.

cthomson

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: Start Occasionally With No Restore
« Reply #8 on: March 31, 2014, 11:28:25 pm »
Okay, I downloaded the trial version and played with it a bit.  The option settings you suggested are not ideal but work fairly well.  Unfortunately, the new window interface doesn't work for me at all.  The new window tabs don't show all documents when used in a Brief configuration (all files share a window).  Is it possible to buy an upgrade to version 17 which I understand still had the original window design?

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Start Occasionally With No Restore
« Reply #9 on: April 01, 2014, 04:21:44 pm »
If you elect to use the "multiple files share one window" mode, you can still get quick navigation for multiple documents by using the old-style file tab. (It's under View > Tool Windows > File Tabs).

You also do have the option to use "One file per window" mode while still using Brief emulation. It's a little bit of a strange hybrid for dyed-in-the-wool Brief users, but the UI does allow it.

The new UI behavior is primarily geared toward allowing you to have multiple dock/split areas, as well as have the ability to drag out and float windows (to make better use of multiple monitors).


cthomson

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: Start Occasionally With No Restore
« Reply #10 on: April 01, 2014, 04:38:08 pm »
Sorry, I don't get the reference to multiple windows from Brief.  From my days working with Brief in DOS, it always had all files loaded into a single window unless you decided to split that single window (F3 plus arrow key)... i.e. you could switch between files (Alt-N) but they always displayed in the single display.  This has always been emulated nicely in SlickEdit using a single maximized window setup although the file tabs along the bottom provided a better frame of reference than the simple status line from Brief (and CodeWright).  When the window is split, it actually split that one maximized window, it didn't create another tabbed MDI document.

I have been reading the SlickEdit 2012 (v17) manual and it looks to me like it will do what I want - combine your suggestion for auto restore settings with the window layout I'm used to.  So, does buying a current version include "downgrade" rights like MS Windows licenses?  Can I buy an upgrade but install 2012 instead of 2013?

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Start Occasionally With No Restore
« Reply #11 on: April 01, 2014, 05:36:28 pm »
Yes, you can use a 2013 license to run the 2012 version.

There was a thread on this forum a few months back where folks that were using Brief emulation were trading ideas for what tweaks they were making when using the new 2013 window architecture. I'll see if I can find that thread again and post the link to it.

cthomson

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: Start Occasionally With No Restore
« Reply #12 on: April 01, 2014, 05:41:53 pm »
Thanks!  Well, I'm off to buy the upgrade elsewhere on this site.  If the Brief tweaks for 2013 are viable for me I'll use that, otherwise I know I can switch to 2012.  Much appreciated.

Graeme

  • Senior Community Member
  • Posts: 2235
  • Hero Points: 279
Re: Start Occasionally With No Restore
« Reply #13 on: April 02, 2014, 12:24:37 pm »
I wrote this macro a while ago to restore a session.  Dunno if it helps.
http://community.slickedit.com/index.php/topic,9389.msg39975.html#msg39975

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4560
  • Hero Points: 353
Re: Start Occasionally With No Restore
« Reply #14 on: April 05, 2014, 01:02:44 pm »
Okay, I downloaded the trial version and played with it a bit.  The option settings you suggested are not ideal but work fairly well.  Unfortunately, the new window interface doesn't work for me at all.  The new window tabs don't show all documents when used in a Brief configuration (all files share a window).  Is it possible to buy an upgrade to version 17 which I understand still had the original window design?

You can still use the old File tabs toolbar with v18. Its just not docked by default.