Intellij format java and xml, intellijjavaxml
During the time when Intellij was used, I have been searching for some skills to continuously improve my proficiency in it. Next, let us know a little bit about how Intellij semi-automated code formatting is supported. To use this function, You have to install the plug-in Eclipse Code Formatter, which can be installed online from the Intellij repository. However, this speed is not flattering, so a network disk is provided here.
* Download Eclipse Code Formatter:Http://pan.baidu.com/s/1dD8NCBJ
① Install the Eclipse Code Formatter plug-in:
If you don't want to talk about installation, simply mention it.
File-> Settings-> Plugins-> Install plugin from disk
② Enable Eclipse Code Formatter
File-> Settings-> Other Tools-> Eclipse Code Formatter-> Use the Eclipse Code Formatter
Select a previous Eclipse Workspace project directory for both Browser buttons. Settings/org. eclipse. jdt. core. prefs, OK, or the previous figure.
You can format the java code here.You have to continue formatting XML.Look down.
③ Next it will be relatively simple. Click it twice and then OK.
Settings-> Editor-> Code Style-> XML
Switch to the Arrangement tab and click the rightmost character Set from..., as shown in figure
④ Directly OK.
⑤ Return to the editor to open a layout file and try to write some code. After writing, remember to use the shortcut key Ctrl + Alt + Shift + L for the first formatting, and call out the Reformat Action option, as shown in the check box, when you format the XML file again, the tag attributes are rearranged.
Okay, that's it. Tired...
* Refer to the official blog:
Http://blog.jetbrains.com/idea/2013/10/rearrange-attributes-in-android-xml-files-with-intellij-idea-13/