If you are looking for software to use, go to Huajun Software Park! software release

How to format code in UE editor UltraEdit

Author: blue thin mushroom Date: 2017-10-05

UltraEdit
UltraEdit-v28.20 latest version

Text editing Storage size: 81.00KB Time: 2022-04-29

Software introduction: UltraEdit Chinese version is a powerful text editor that can meet almost all your work needs. Using UltraEdit text...

Download now

Everyone has always thought that UltraEdit is an ordinary notepad that can edit code, and that it cannot implement the function of formatting code. In fact, this is not the case. Using special methods, the UE editor UltraEdit can also format the code. Not only can it Format XML files and Java, C/C++, C# source code files, and also format artistic styles.

The XML file is formatted as follows:

1. Open the XML file that needs to be formatted, click the Format-->XMLlint Tool menu item, and check the box in the pop-up dialog box.

2. "Reformat and reindent the output, where indentaion is: " This item, and then click the "Parse" button, the formatted result will appear in the Outpu window. If you need to get the formatted text, you can Right-click on the Output window and select the "Copy To Clipboard" menu item to copy the text to the clipboard for processing by other programs;

If you need to format the current XML file opened by UE and directly output the result to the current file, you can do this:

1. Click the Advanced-->Tool Configuration menu item, click the "Insert" button in the pop-up dialog box, and then enter the name of the command menu in the "Menu Item Name" column (for example: "Format XML file") , then enter the following command in the "Command Line" column:

"C:/Progra~1/IDMCom~1/UltraEdit-32/GNU/XMLlint.exe --format --output %f %f"

Uncheck the "Capture Output" option in the Output tab, and finally click the "OK" button to complete the configuration.

2. Now, if you want to format the opened XML file, just select the "Format XML File" menu item under the "Advanced" menu.

The formatting methods for Java, C/C++, and C# source code files are as follows:

1. The configuration is similar to the XML formatted configuration, except that the command entered in the "Command Line" column in the "Tool Configuration" dialog box is different.

Java source code uses the following command line:

"C:/Progra~1/IDMCom~1/UltraEdit-32/GNU/astyle.exe --style=ansi --mode=java %f"

C/C++ source code uses the following command line:

"C:/Progra~1/IDMCom~1/UltraEdit-32/GNU/astyle.exe --style=ansi --mode=c %f"

The C# source code uses the following command line:

"C:/Progra~1/IDMCom~1/UltraEdit-32/GNU/astyle.exe --style=ansi --mode=cs %f"

Please remember to uncheck the "Capture Output" option in the Output tab, and finally click the "OK" button to complete the configuration.

Note: The path of the file to be formatted cannot contain spaces or Chinese characters. I have not solved this problem yet.

2. Now, you only need to select the corresponding format menu item to format the open file!

Related articles