Atom Editor - how to automatically reformat source code (PHP, HTML, CSS, Python, Javascript, etc.)

Atom Editor - how to automatically reformat source code (PHP, HTML, CSS, Python, Javascript, etc.)

Hi, I am using the Atom editor and I would like to know if there is any add-on that will allow me to reformat the whole code - indent PHP code eg for foreach, for functions, etc. Thanks

REPLY


Hi,

yes, the Atom editor has an atom-beautify add-on for code reformatting. So you first need to download the atom. Reformatting CSS, HTML will work right away (maybe Python and javascript).

The reformatting of the source is then done by marking eg the whole code ctrl + a and then you put ctrl + shift + p and then you write eg html and choose = this will neatly reformat the whole source as html code.

Reformatting PHP requires that you first do the following (on Linux):
wget https://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -O php-cs-fixer
sudo chmod a+x php-cs-fixer
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer

Související obsah

programovani

atom

editor

ide

Komentáře

Vaše reakce na Editor Atom - jak automaticky přeformátovat zdrojový kód (PHP, HTML, CSS, Python, Javascript atd)

Reference

Podívejte se na naše reference

Prohlédnout

Aplikace

Podívejte se na naše aplikace

Prohlédnout

Co umíme?

Podívejte se co umíme

Prohlédnout

Co umíme?

Vytváříme sofistikované aplikace pro náročné

Od webových aplikací přes android až po převodové můstky či složité informační systémy.

Podívejte se k nám

Máte ještě čas? Podívejte se na další rubriky

Tento web používá soubory cookie. Dalším procházením tohoto webu vyjadřujete souhlas s jejich používáním.. Více informací zde.