Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set auto-indent and formatting style in Atom.io editor

I'm looking for a way to auto-format code in Atom.io, but so far I did not find anything useful in the forums...

I know other IDEs have this feature. For example in Netbeans there is a feature to auto-format code that is configurable (Tools>Options>Editor) in terms of style and language where you can fine-tune any aspect of formatting, such as spaces before keywords or parentheses, specific keyword indentation, tab size, indent size, braces placement and so on.

Is there anything similar in Atom.io, or is there a way to emulate, maybe only partially, this auto-format features?

like image 254
sparviero19 Avatar asked Jan 25 '26 04:01

sparviero19


2 Answers

Have you check Atom Beautify ?

like image 101
AtomTips Avatar answered Jan 28 '26 12:01

AtomTips


my atom version is 1.8.0. In keymap.cson, I use this: 'atom-workspace atom-text-editor:not([mini])': 'ctrl-alt-i': 'editor:auto-indent'

like image 35
wei zhu Avatar answered Jan 28 '26 10:01

wei zhu