Having a per project configuration

Having a per project configuration

2
NewbieNewbie
2

    Nov 01, 2013#1

    I have been using UltraEdit years but have just started using projects. I tried creating a project for some open source code I am working on. I was hoping to be able to have different setting for this project then I normally use. Some of the settings I would like different are tab settings, layout, and be able to specify a fixed search path for find-in-files. I saw an old thread 'Project Tab Stop Setting' from 2006 which indicated that tab settings by project was not possible but I was hoping things have changed. Also Mofi commented about using special ini files for some projects. How can I associate an INI file to a project? I saw I could attach a wordfile to a project but did not find what I needed.

    6,688587
    Grand MasterGrand Master
    6,688587

      Nov 01, 2013#2

      It is still not possible to configure the settings you want in the project settings dialog. The tab stop and indent settings can be still customized only with dependency on file extension, but that is most likely no help if you are working now on an open source project which uses different tab stop and indent settings as you usually use for same type of files.

      However, it is quite easy to use a special INI file which is associated to a project. Here are the steps to do that:
      1. While no instance of UltraEdit is running, open Windows Explorer, copy into the address bar %APPDATA%\IDMComp\UltraEdit\ and hit key RETURN. This opens the directory in which usually the file uedit32.ini is stored.
      2. Create a copy of all uedit32.* files in same directory with changing the file name, but not the file extension. Best would be to use the name of the project as file names.
        So you should have finally project.ini (settings), project.in0 (standard workspace), project.mb0 (main menu), project.pb0 (customizable popup menus), project.tb0 (toolbars), project.uek (key mapping if present at all).
      3. Create a copy of the shortcut file starting UltraEdit or create a shortcut to uedit32.exe with name project.lnk wherever you want that shortcut (Windows desktop, Windows start menu, Quick Launch bar, ...).
      4. Right click on the shortcut file project.lnk and left click on Properties at bottom of the context menu.
      5. On the command line containing uedit32.exe append a space character and /i="%APPDATA%\IDMComp\UltraEdit\project.ini"
      6. I suggest further as working directory (Start in) the directory of the project instead of the UltraEdit program files directory.
      7. You can also add a comment for this shortcut and of course assign a different icon, either from uedit32.exe or any other file containing icons. Perhaps you have a project icon file. Save the modifications on the shortcut file with clicking on button OK.
      8. Now use this new shortcut to start UltraEdit. Verify at Advanced - Configuration - Application Layout - Advanced that UltraEdit uses indeed project.ini instead of uedit32.ini.
      9. For the project related configuration of UltraEdit, it is best to enable the setting Allow multiple instances at Advanced - Configuration - Application Layout - Miscellaneous so that you can start UltraEdit with this special project related configuration always independent on another instance of UltraEdit using the standard settings in uedit32.ini.
      10. Further enable Reload files previously open on startup at Advanced - Configuration - File Handling - Load to automatically reload the project you want to work on with this special project related configuration.
      11. What you have to do now is open the project, configure the tab stop and indent settings, configure the workspace (stored in the workspace file of the project), and if you want, create a new theme and/or a new layout used only for this project with this special project related configuration.
      That's it.

      This solution might have one disadvantage. On double clicking on a file in Windows Explorer to open it in UltraEdit, it could happen that the file is opened in a new instance of UltraEdit using standard settings in uedit32.ini instead of an already running another instance of UltraEdit using the standard settings in uedit32.ini. This might happen if UltraEdit with the special project related settings was started first and the other instance of UltraEdit using the standard settings was started second.

      There is a second method which avoids the problem described above on double clicking on a file to open it in the already running instance of UltraEdit which uses the standard settings.

      After step 4 in the list above, open the program files directory of UltraEdit and create a copy of uedit32.exe with name project.exe and a copy of uedit32.chm with name project.chm in same directory. And in step 5 do not append /i="%APPDATA%\IDMComp\UltraEdit\project.ini" to the command line, but replace uedit32.exe by project.exe on the command line.

      So with this little hack you have another UltraEdit executable with name project.exe which uses automatically the configuration files project.* in "%APPDATA%\IDMComp\UltraEdit\. As all existing file associations are made for uedit32.exe, double clicking on a file will result now always in opening the file with uedit32.exe using uedit32.ini and the special project related configuration is used only when starting UltraEdit with the shortcut for the project.

      But be aware when using the second method that you have to make those two copies of uedit32.exe and uedit32.chm every time you update UltraEdit. And you should in the special project related configuration disable also Automatically check for updates at Advanced - Configuration - Application Layout - Miscellaneous.

      I must add that I have used and still use for some old projects the first method with the separate INI file specified on command line of a shortcut, but I have never used the second method with the renamed executable. So I don't know if this method still works with the new license system introduced with UE v17.00.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Nov 06, 2013#3

        Thank you very much for the detailed explanation. Method one will work great for me. I will only use projects for the occasional special cases and I can limit use to not double clicking files in explorer. For normal use (when I would be opening files from explorer) I would only need my default configuration.