Is there a command for formatting HTML in the Atom editor?

前端 未结 6 1976
长情又很酷
长情又很酷 2020-12-22 20:24

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

6条回答
  •  误落风尘
    2020-12-22 21:03

    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 :

    • Open Atom Editor.
    • Press Ctrl+Shift+P (Cmd+Shift+P on mac), this will open the atom Command Palette.
    • Search and click on Install Packages & Themes. A Install Package window comes up.
    • Search for Beautify package, you will see a lot of beautify packages. Install any. I will recommend for atom-beautify.
    • Now Restart atom and TADA! now you are ready for quick formatting.

    To Format text Using atom-beautify :

    • Go to the file you want to format.
    • Hit Ctrl+Alt+B (Ctrl+Option+B on mac).
    • Your file is formatted in seconds.

提交回复
热议问题