Empty lines after inserting the default smart language template HTML5 into a new HTML file (fixed)

Empty lines after inserting the default smart language template HTML5 into a new HTML file (fixed)

3
NewbieNewbie
3

    Feb 01, 2023#1

    I see in UltraEdit that line height & vertical space is too large. Can it not be made automatically like Sublime text and Visual Studio Code where there are normal line heights as in the attached picture?

    Thank you so much for reply my message.
    ultraedit line height space is high.png (59.2KiB)
    vs code line height normal.png (28.73KiB)
    sublime text line height normall also.png (41.24KiB)

    6,602548
    Grand MasterGrand Master
    6,602548

      Feb 01, 2023#2

      Could you compress the HTML file into a ZIP file and attach the ZIP file to your next post?

      It looks like your HTML file contains not just carriage return + line feed (DOS/Windows line ending) or just line-feed (Unix line ending) at end of each line, but carriage return + carriage return + line feed.

      There can be run with the UltraEdit regular expression engine a replace all searching for ^r+^n and use as replace string ^p to fix the line endings in the HTML file. The same can be achieved with a Unix/Perl regular expression replace all searching for \r+\n and use as replace string \r\n to fix the line endings.

      Such wrong line terminations are caused usually by using the wrong settings on FTP/FTPS/SFTP file transfers between local machine and remote server like using the ASCII transfer mode while the text files on the server have already DOS/Windows line endings.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Feb 02, 2023#3

        Hello!

        Thank you so much for your reply.

        I tried already to create the HTML file again as it could be seen in the former attached video being later deleted. I must hit ENTER twice so that the file can be edited. Why? The HTML file cannot be edited if I don't hit ENTER twice.

        6,602548
        Grand MasterGrand Master
        6,602548

          Feb 02, 2023#4

          The problem is not caused by the line endings in the HTML file. The problem is the smart HTML language template with name HTML5 which inserts the HTML block with additional empty lines.

          The predefined language template file html-tpl.xml is not changed since UltraEdit for Windows v26.00. I use myself customized templates for HTML and have not recognized before that the installed template file for HTML contains smart multi-line templates being defined wrong since UltraEdit v26.00.

          A quick fix is the language template file html-tpl.xml in the attached ZIP file which must be extracted to the folder %APPDATA%\IDMComp\UltraEdit\templates\language with replacing the existing file with same name on not being already customized by you.

          Please note that the closing tags </div>, </form>, </script> and </table> are positioned wrong in the line after inserting the template div, form, script or table with the default configuration settings. That can be corrected only with disabling automatic indent and customize the multi-line templates.

          Click on ribbon tab Layout in third group Lists on item Templates to open the Template List view. Right click on a template like the HTML template HTML5 and click on context menu item Add/Modify template to customize the template to your needs.
          html-tpl.zip (773 Bytes)   2
          HTML language template file with erroneous lines removed in the multi-line templates
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Feb 02, 2023#5

            Okay, thank you so much. I think we must contact and email UltraEdit´s team to get fixed this error. Sorry for wrong description in first post.

            I solved the empty lines issue for template HTML5. If we want to make such changes also for PHP and JavaScript templates, we can do that like for HTML5 template. Is that right?

            6,602548
            Grand MasterGrand Master
            6,602548

              Feb 02, 2023#6

              Yes, all template files can be fully customized by a user of UE/UES. The template files in %APPDATA%\IDMComp\UltraEdit\templates are never updated by the installer of UltraEdit/UEStudio or UE/UES as neither the installer nor UE/UES can find out if the user customized them on this directory already existing on start of UE/UES. There can be configured also a different directory for templates at Advanced - Settings or Configuration - Directories, for example, if multiple users should use the same set of templates stored in a shared templates folder.

              BTW: I have sent two issue reports by email to UltraEdit support, one for the erroneous empty lines in default HTML language template file of UltraEdit for Windows v26.00.0.70 to v2022.2.0.44 and another one for the automatic indentation of all lines inserted by a multi-line HTML language template after inserting the opening tag in first line of the template on using the default configuration which started with UE/UES v2022.0 according to my tests with several older versions of UltraEdit.

                Aug 17, 2023#7

                UPDATE: The template file html-tpl.xml installed with UltraEdit for Windows v2023.0.0.41 and UEStudio v2023.0.0.41 or a newer version in the subdirectory template\language of the UltraEdit/UEStudio program files directory contains correct all multi-line templates including the template HTML5. Inserting the default template HTML5 with using the default configuration works with correct indents since UE/UES v2023.0.0.41 too.

                The HTML language template file html-tpl.xml should be copied manually from the subdirectory template\language of the UltraEdit/UEStudio program files directory into the directory %APPDATA%\IDMComp\UltraEdit\templates\language respectively %APPDATA%\IDMComp\UEStudio\templates\language on not having added or edited in the past any HTML language template and UltraEdit/UEStudio was upgraded from a version prior 2023.0.
                Best regards from an UC/UE/UES for Windows user from Austria