I have created a .editorconfig
file as shown below for intellij
# editorconfig.org
root = true
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
indent_style = space
indent_size = 4
[*.js]
indent_size = 4
[{package.json}]
indent_style = space
indent_size = 4
How do i apply this code style to all the files in one shot right know i will open a file and press Ctrl + Alt + l which will do the job is there a way to apply this as the config for all the application in intellij14
Make sure to follow the steps in Michal's answer first. If you want to retroactively apply this editorconfig to your existing files, do the following:
.editorconfig
you are happy with.1:Project
sidepane, right click on the folder you want to apply the .editorconfig
to (eg the root folder of your project)Reformat Code
, which has the default shortcut ctrl alt L . Your files now follow your .editorconfig
file configuration.
If you added the file after project initialization.
You need to add the file .editorconfig on the root of the project.
Once happy with you file configuration right click and select synchronize '.editorconfig'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.