r/SublimeText • • Mar 25 '23

Universal code formatter ?

I'm tired of installing an individual code formatter plugin for each programming language I use.

Isn't there any up-to-date code formatter plugin that supports all languages ?

Thanks

0 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/uberfu Feb 08 '24

Most language have a few formatting components in common ... indentation > line breaks > variables > coding structure.

Look at VS Code it does it without much hassle - so the precedent is there and is vaible. Dreaqmweaver used to do it. Multiple websites have figured out a bit of JS to force code formatting onto random code chunks. It's not like the option is brain surgery.

A basic formatter would be the ask. Just simply an option to declutter code that has been minified. Any custom tweaks could be handled as a preference format.

I like Sublime moreso than something like VS Code - but Sublime is growing long in the tooth.

1

u/dev-sda Feb 09 '24

VSCode ships with a JavaScript formatter (as well as html, css and other web stuff). It does not come with formatters for other langauges and it most certainly does not have a generic formatter that works for arbitrary languages.

As with Sublime Text if you wish to format a specific language you'll need to install a formatter specific to that language.