Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme isn't clear, how do I do a Command "beautify.format"? #37

Open
teckel12 opened this issue Sep 28, 2020 · 3 comments
Open

Readme isn't clear, how do I do a Command "beautify.format"? #37

teckel12 opened this issue Sep 28, 2020 · 3 comments

Comments

@teckel12
Copy link

Also, how would one change the settings in beautify.options?

The menu options to do these things would be useful as without this knowledge, I can't use this extension.

@teckel12
Copy link
Author

Lots of searching and experimentation (much of the issue is that there's two kinds of command prompts in Visual Studio Code, which makes doing a Google search for "Visual Studio Code command prompt" return all the wrong information. But, below are the instructions which you are missing:

  1. Open document to format
  2. On menu, select View -> Command Palette
  3. Enter: beautify.format

With that said, I still can't get it working as I still can't figure out how to change the settings in beautify.options as there doesn't seem to be that file. Instead, it wants to make the changes in settings.json. While the indent_with_tabs option seems to work, I can't get other options to work at all. So maybe doing the settings in settings.json even works (as it doesn't match the limited instructions.

@anh65498
Copy link

anh65498 commented Dec 18, 2020

So I followed your 3 steps too and my CSS file still hasn't been formatted. However, once I made a change to my CSS file and save the file, beautify.format atomically kicks in and format my CSS file. Hope this resolve it.

@headwinds
Copy link

thanks for the digging @teckel12 and tip @anh65498 - after following your steps, I also saw that from the command palette you can click the gear to give it a custom short cut - for me, format on save seems flaky - it doesn't also kick in.

Screen Shot 2021-02-06 at 1 19 03 PM

During a code review, a colleague pointed out that I had used 4 instead of 2 spaces on a super long scss file - beautify saved the day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants