Any way to save current workspace?

Any way to save current workspace?

5
NewbieNewbie
5

    Dec 31, 2014#1

    In UltraEdit, is there any way for me to save the current set of files I have open? I do not mean to save the data in the files, but instead, save the list of files and give it a name, like a workspace name, so later I can retrieve that set of files at once. It would be the same behavior UE exhibits when starting up, remembering the last set of open tabs, except I'd be able to choose the set to open.

    The UI mentions Project/WorkSpace but I don't see that this workspace concept is implemented in UE. I've fooled around with the projects in UE but they require a managed set of files and I do not see a simple way to use them as workspaces.

    Thanks,
    Steve

    6,602548
    Grand MasterGrand Master
    6,602548

      Dec 31, 2014#2

      Take a look at Why save files to a Project? I have explained there the difference between a project and a workspace.

      First, it is most likely best for you to configure at Advanced - Configuration - File Handling - Advanced
      • enable Save project information for use on multiple systems
      • do not enable Store project user interface (pui) files in profile directory
      This is for keeping workspace.prj (project file) and workspace.pui (workspace file) together. Click on button Help for details on those 2 settings.

      Second, you might want to open Advanced - Configuration - File Handling - Miscellaneous and uncheck setting Close all files when opening or switching projects. I suppose that you want to have this setting enabled. But later after having created one or two workspaces, look on help on this setting, try the setting in both states and then take your decision.

      Now with some files being opened and no workspace also opened, click in menu Project on New Project/Workspace. All you need to do is selecting a directory for storing workspace.prj (project file) and workspace.pui and entering the name of the workspace. On second dialog opened for the project settings ignore all project related options like adding files and folders, filter options, etc. and just click on button Close.

      And that's it. You have created a workspace for the currently opened files.

      The project file workspace.prj does not contain anything useful in this case, but must be kept nevertheless. The workspace file workspace.pui contains all the data to restore the list of opened files as on last close of the workspace.

      Try it out. Click on Close Project/Workspace in menu Project and then open any file. Click on the workspace listed now at bottom of menu Project and currently opened file is closed (or kept according to setting). The files of the workspace are re-opened with caret position in each file restored, the active file on closing of workspace being again the active file, bookmarks restored, code folding restored, ...

      BTW: If you want to quickly open a workspace in a new instance of UltraEdit without changing anything in currently running instance of UltraEdit, you can
      1. click on Open New Instance of UltraEdit in menu Advanced in UltraEdit and open in the new instance the workspace, and/or
      2. create somewhere (Windows desktop, Windows start menu) shortcuts to uedit32.exe with command line edited by appending the parameters /fni "Path to Project File of Workspace\workspace.prj"
        By clicking on such a shortcut always a new instance of UltraEdit is started because of first parameter /fni with opening the workspace because of second parameter.
      Best regards from an UC/UE/UES for Windows user from Austria

      115
      Power UserPower User
      115

        Dec 31, 2014#3

        You may be able to use the Tools menu to call a batch file that opens a list of files but then you would have to create the list manually and I'm not sure that the files will all open in the same instance of UltraEdit.

        A slower option once you've made a file list but using only UltraEdit by itself. Open the file containing file names in UE and highlight a name. A right-click will give you the option to open the file. However this only works with one file at a time. If you highlight several files only the first one is listed to open. The advantage over using the recent files on the menu is that the same file names will always be present and more files can be listed than the recent files can hold.

        You could create a list for each project. For local files just the full path is needed. For remote files the format is FTP::user account\/path/to/files with FTP capitalized, a space between user name and account name and the backslash '\' before the remote file path.

        5
        NewbieNewbie
        5

          Jan 02, 2015#4

          Thanks so much for the info - very useful.

          I found that to do specifically what I was looking for (save a set of open files), I just need to have a set of files open in the editor, create a new project, then immediately close the project. Closing the project prevents the saved set of files from varying as I open/close further files. Later when I want the exact set of files open again, I just open the project and immediately close it again, without closing the open files.

          Steve

          6,602548
          Grand MasterGrand Master
          6,602548

            Jan 06, 2015#5

            Hi Steve,

            if you never want to change something on a workspace after creation, you could set read-only file attribute on the *.pui file of the stored workspace. UltraEdit does not update the workspace file in future on closing project/workspace if the workspace file has read-only attribute set. There is no warning or error message displayed by UltraEdit because of *.pui file being read-only.
            Best regards from an UC/UE/UES for Windows user from Austria