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

cthomson

  • Community Member
  • Posts: 38
  • Hero Points: 1
Re: Start Occasionally With No Restore
« Reply #15 on: April 05, 2014, 01:22:50 PM »
Yes thank you, I found that.  However, that leaves the window tabs at the top along with the file tabs at the bottom... redundant and using up screen real estate.

I have since upgraded my 2009 to 2012 and I'm quite satisfied with that resolution.  I gained the ability to use SlickEdit as a notepad replacement while still being able re-open project workspaces when needed.  Now I can stop testing all the other text editors (Boxer, PSPad, UltraEdit, etc.) looking for a notepad replacement since I've always preferred SlickEdit.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6868
  • Hero Points: 528
Re: Start Occasionally With No Restore
« Reply #16 on: April 06, 2014, 01:54:55 AM »
Here's what you need to do to get the Document tabs in v18 not to be displayed when you have just one window (like v17).

Close all files, open one file, use Zoom Toggle (Window>Zoom Toggle). The Document tabs should be gone now. Now close the file so you have no windows open any more. SlickEdit will remember this (it's an undocumented trick).

After performing these steps, when you have just one window, the Document tabs won't be displayed! Now v18 will be operate a lot like v17 with regard to screen real estate.

This is the way I work but I don't use the File Tabs tool window. I live on tag navigation, smart open, and directory aliases for opening files. Once in a while I use list-buffers to reopen a buffer. It performs the same function as File Tabs but doesn't take any screen real estate. Since I open tons of files, this works better for me than the File Tabs.

cthomson

  • Community Member
  • Posts: 38
  • Hero Points: 1
Re: Start Occasionally With No Restore
« Reply #17 on: April 07, 2014, 02:01:04 PM »
That's very interesting.  Is that new to 2103 (v18)?  It doesn't work in 2012 (v17).  I can open a file and zoom then exit SlickEdit but the next time I start it still has the window border with the title bar.  That's still less annoying than the title bar plus the tabs at the top.  And I've gotten used to it because when one splits the window it always goes back to displaying the title bar for each side.

Is there any way to have the zoom command run automatically at startup?  I tried including -#zoom-window in the Windows shortcut but that seemed to have no effect.  It's been some time since I played with SlickEdit macros and I've forgotten the startup sequence.

Actually, this gets back to the original question in a way.  Is it possible to create a macro that runs at editor startup, checks invocation arguments and either opens the last workspace if no filenames specified or loads the specified files without opening the last workspace?
 

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6868
  • Hero Points: 528
Re: Start Occasionally With No Restore
« Reply #18 on: April 07, 2014, 04:05:44 PM »
You have to close all open files, open a file, zoom, then close the file so there are no windows open (not exit the editor). I'm pretty sure this works in v17.

You can definitely check invocation arguments at startup but not without modifying macro code we ship (defmain() in main.e).

This might work for your start up issue.

     * turn off "Auto restore files"
     * turn off "Auto restore workspace"
     * turn on "Auto restore workspace files"

vs myfile.cpp   <-- this will open myfile.cpp

vs myworkspace.vpw   <-- This will open the workspace and restore files

You can also open a workspace by selecting the most recently opened workspace.

cthomson

  • Community Member
  • Posts: 38
  • Hero Points: 1
Re: Start Occasionally With No Restore
« Reply #19 on: April 07, 2014, 04:18:12 PM »
You're right!  I was doing the steps incorrectly by closing the editor instead of the file.  Thank you, that's a nice feature.

And your suggestion to open files or workspaces as needed also works very well for my needs.  I can have a shortcut to SlickEdit in my Send To folder for opening individual files as a notepad replacement and I can navigate to project folders to open workspace files (or even create workspace shortcuts on my desktop) for when I need to work on a project.  That's an excellent solution - thank you!

jbrandwood

  • New Community Member
  • Posts: 2
  • Hero Points: 0
Re: Start Occasionally With No Restore
« Reply #20 on: June 29, 2014, 05:57:36 PM »
Thank you for this topic ... it's exactly what I've just been looking for.  ;)

jbrandwood

  • New Community Member
  • Posts: 2
  • Hero Points: 0
Re: Start Occasionally With No Restore
« Reply #21 on: July 01, 2014, 03:57:09 AM »
Oh dear ...

Starting up SlickEdit 2012 with "+new -snorestore -snoconfig" does open up a new bare instance of SlickEdit quite nicely, but then performing a drag-and-drop on that window closes any open files and just leaves the new file.  :(

I really don't think that SlickEdit likes having multiple windows open.




Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6868
  • Hero Points: 528
Re: Start Occasionally With No Restore
« Reply #22 on: July 02, 2014, 11:48:56 PM »
It sounds like you are in an emulation where "Files per window" is set to "Multiple files share window" (brief, emacs, slickedit). When in this mode, you will only see one Document tab until you split the window. You can try changing this option but you may or may not like it. Tools>Options>Editing>Editor Windows>Files per window.