Tapatalk

Different configurations for same file extension?

Different configurations for same file extension?

2
NewbieNewbie
2

    May 03, 2006#1

    Hello *,

    what I'd want to achieve is to have different configurations for the same file extension that could be loaded or saved.

    I know I can do this for different extensions like .txt and .txt1 for example.

    But here there are some .txt files with different needs.

    One should insert spaces for tabs with a tab width of 4 and insert a cr/lf after column 60.

    The other one should insert real tabs with a width of 8 and no automatic linebreak.

    Is there a way to do so without having to rename the original files?

    Thanks in advance for any hints!

    6,685587
    Grand MasterGrand Master
    6,685587

      May 03, 2006#2

      Without renaming the files this is not possible except you have 2 INI files for UltraEdit. The default uedit32.ini for the .txt files with a real tab and no automatic linebreaks and a second one, for example named ue4tab60.ini, used for the other text files.

      Save the second INI also in the directory of uedit32.ini and change a color (i.e. background color) to easily see which INI is used for current active instance of UE.

      Then you can edit the text files with special settings with the second INI by starting UE with a shortcut with the command line parameter /i="....\ue4tab60.ini".

      You should enable the option Allow Multiple Instances at Configuration - Application Layout - Miscellaneous in both INIs to avoid problems when you have open the UE instance with ue4tab60.ini and double click in Windows Explorer on a file normally opened with UltraEdit.


      Maybe I have also a second solution which is also not easy to handle. You could write 2 macros. The first one runs on every file load and the second one on every file same. Both need a user tool which runs a batch file because in the macro language no file renaming is possible.

      On every file load the load macro checks, if this file should be edited with a tab width of 4. You should know the criteria for making this decision. If this is true, it closes the file and runs the user tool (batch file) which renames this file with a different file extension and this renamed file is loaded by the macro.

      The save macro saves the file, checks the file extension and if the extension is .txt1, it closes the file and runs again the user tool (batch file) to rename it back. It would not be possible to save the .txt1 file without closing it because renaming would not be possible.

      It's also possible that the batch file copies the file instead renaming it which would allow you to save the .txt1 file without closing it. But you have to delete the .txt1 copies manually on file close or use always a macro for closing a file too.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        May 03, 2006#3

        Thank you very much for your proposals. I will think about them although both are not as comfortable as I had wished for.