I would like to format my HTML with a command, as I do in Visual Studio, using Ctrl+K+D. Is this possible in Atom? If not, are there other options?
This question is related to
html
atom-editor
code-formatting
There are a few packages for prettifying HTML. You can find them by searching the Atom package archive:
Or just go to this link: https://atom.io/packages/search?q=prettify
Once you've selected a package that does what you want you can install it by using the command: apm install [package name]
from the command line or install it using the interface in Preferences.
When the package is installed, follow its instructions for how to activate its capabilities.
You can add atom beauty package for formatting text in atom..
file --> setting --> Install
then you type atom-beautify in search area.
then click Package button.. select atom beuty and install it.
next you can format your text using (Alt + ctrl + b) or right click and select beautify editor contents
https://github.com/Glavin001/atom-beautify
Includes many different languages, html too..
Not Just HTML, Using atom-beautify
- Package for Atom, you can format code for HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more) in Atom within a matter of seconds.
To Install the atom-beautify
package :
Install Packages & Themes
. A Install Package window comes up.Beautify
package, you will see a lot of beautify packages. Install any. I will recommend for atom-beautify
.To Format text Using atom-beautify
:
Source: Stackoverflow.com