![]() The root tag of XML element will be the <. They include an extension called sublime-snippet. If the formatting does not respond after confirming that the plug-in is installed correctly, restart Sublime and try again. Snippets are simple XML supported files with various attributes. When the file content is small, the effect after formatting may not be obviousģ. Pay attention to the prerequisites for installing plugins, such as php and node.jsĢ. Save and exit after modification, open the html/js/css file that needs to be formatted, and then the shortcut key ctrl+shift+h can format. Modify the node.js installation path pointed by the arrow under the window system. Modify the node.js installation path in the opened file Click to open the configuration file shown in Figure 8 below View Imageįigure 8 Configure html/css/js/prettify plug-inģ. Also start from the third step of installing the xml plug-in, enter html-css-js until the following figure 7 appears, click install. The plugin needs to be installed in advance node.jsġ. Open the php file that needs to be formatted, and then the shortcut key ctrl+F11 or ctrl+Fn+F11 can format the php file. Enter the following in the opened file, where the "php_bin" option is your php installation path, change it yourself. Then open the file shown in Figure 6 below for configuration. When there is no response in the lower left corner, the installation is successful. After installing PHP, enter phpfmt as shown in step 3 in installing the xml plugin, as shown in Figure 5 below, and then click phpfmt, the installation will start automatically. This plugin needs to install PHP first, it is recommended to install a newer version.Ģ. Then open the xml file that needs to be formatted, and then select indent xml as shown below to format XML. After a while, tens of seconds, the installation will be successful. After clicking, the lower left corner will start to show that the installation is in progress. Enter indent in the pop-up input box, the indent xml option will appear below, click on the optionĤ. After loading, it will automatically pop out of the input boxģ. Click the install package option, the database will be loaded automatically, wait a while. Open Sublime Text 3, press the shortcut key ctrl+shift+p, enter install package in the pop-up display box (as long as the option pointed by the arrow appears)Ģ. If the formatting does not respond after confirming that the plug-in is installed correctly, restart Sublime and try again. In addition, the plug-ins are installed online through package control. How to indent XML files automatically when opened in Sublime Text 2 Dev 1) Tools > New Plugin 2) Copy and paste code below 3) Save in the Packages/User. The following three plugins still feel very practical. When using Sublime to write code, we all hope that the code is clean and beautiful.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |