코딩 | 개념 정리/Visual Studio

VS Code에서 웹 개발 언어 자동 줄맞춤

PatienceLee 2022. 6. 8. 17:22

js-beautify for VS Code👍

Default Hot Key: Ctrl + Shift + B

But, I already used this key, so I customized the hot key.

My Hot Key: Ctrl + Alt(align) + B(by beautfiy)

Beautify javascript, JSON, CSS, Sass, and HTML in Visual Studio Code.

VS Code uses js-beautify internally, but it lacks the ability to modify the style you wish to use. This extension enables running js-beautify in VS Code, AND honouring any .jsbeautifyrc file in the open file's path tree to load your code styling. Run with F1 Beautify (to beautify a selection) or F1 Beautify file.

For help on the settings in the .jsbeautifyrc see Settings.md

How we determine what settings to use

  1. When not using a multi-root workspace:
    1. If there is a valid .jsbeautifyrc in the file's path tree, up to project root, these will be the only settings used.
    2. If an option is a file path or object of configuration specified in the user or workspace settings like this: "beautify.config" : "string|Object.<string,string|number|boolean>", these will be the only settings used. The file path is interpreted relative to the workspace's root folder.
    3. If there is a valid .jsbeautifyrc in the file's path tree, above project root, these will be the only settings used.
    4. If there is a valid .jsbeautifyrc in your home directory, these will be the only settings used.
  2. When using a multi-root workspace: Same as above, but the search ends at the nearest parent workspace root to the open file.
반응형