Is there a plugin, or setting in Sublime Text that will enable project-level code formatting and application of the .EditorConfig plugin?
I'm wondering specifically about manual application of .editorconfig preferences re-indenting multiple, deleting trailing whitespace, converting spaces to tabs, etc., across file types. To keep it basic, I'll limit my query to HTML, CSS/LESS/SASS, and JS.
Ctrl+Shift+H (or Cmd+Shift+H if you're on a Mac). Right click in the current buffer and select HTML/CSS/JS Prettify -> Prettify Code . Open a HTML, CSS, JavaScript, JSON, React or Vue file, pop out the console in Sublime Text from View -> Show Console, and type view. run_command("htmlprettify") .
Open an HTML file in sublime text. Select the file content using ctrl+A command, It selects all the content. Go to Edit Menu – Select Line + Select Reindent . This formats the HTML files.
Usage. ctrl + shift + P and type Tidy PHP , or you can use the ctrl + alt + T keybinding.
There is no tool quite like this yet. There are some tools that almost do what you want. For example my not-yet-stable EditorConfig tools, eclint (not sure how stable this is), and codepainter (which works for JavaScript only).
An EditorConfig bulk reformatter would be great. If anyone finds one I didn't mention or wants to create a better one, you could probably find some help or moral support on the EditorConfig mailing list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With