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

Add option to prettify the code (i.e. nice indents) #4

Closed
TanayB11 opened this issue Aug 10, 2020 · 5 comments
Closed

Add option to prettify the code (i.e. nice indents) #4

TanayB11 opened this issue Aug 10, 2020 · 5 comments

Comments

@TanayB11
Copy link

This plugin is amazing, I love it!

I tried using it to add in some HTML for me with Tailwind, and the output for the plugin is mostly minified. I have to then go back into the code and then format it. Ideally, there should be an option to deliver the output for Tailwind in a way that is more readable.

@bernaferrari
Copy link
Owner

I agree. However, you can access prettify tools very easy, on both vscode and codepen. It is supposed to be just a click (or shortcut) away. Can you give me a scenario where you don't have access to these tools?

@TanayB11
Copy link
Author

It would be nicer to have it built into the tool mainly to inspect what is going on. For larger (or smaller) HTML outputs, often a user might want to inspect what is coming out to see what they might want to tweak, add, or remove.

I use Vim and haven't figured out how to get that to work yet (I'm certain there's a way, so it's not worth adding it just for that reason).

@bernaferrari
Copy link
Owner

The biggest issue is that I append the values to the end of the string, and sometimes use "\n", but it doesn't keep track of indentation. So I would need to keep track and then add the correct number of spaces for every newline..

You could also try this extension: https://github.com/prettier/vim-prettier

@TanayB11
Copy link
Author

You're right, and it doesn't seem to be worth the effort at this point. Now that I've had some time to think about it, it might just be a better idea to leave it to the editor.

@bernaferrari
Copy link
Owner

Thanks! haha
Yeah, ideally everybody should be using prettifier or something else. That might be a way to enforce those good practices 😛

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

2 participants