Atom-beautify: Beautify not yet saved files / files without currently selected grammars

Created on 12 Aug 2015  路  5Comments  路  Source: Glavin001/atom-beautify

Hi,

sometimes, I just want to beautify some code in my clipboard. For this, I'd like to throw it in an unsaved, new file in Atom and just hit "Beautify". But currently, I get this message: "Atom Beautify could not find a supported beautifier for this file".
Of course, the plugin doesn't have a clue what to do with this text.
It would be very neat, if Beautify could ask what beautifier to use in this case. The user could select then from a list.

question

Most helpful comment

This is a two part issue:

  • Atom should be attempting to recognize the grammar from the file without using its extension
  • Atom Beautify should popup asking the user which beautifier they want to use, if Atom has been unable to detect the grammar

For this, I'd like to throw it in an unsaved, new file in Atom and just hit "Beautify".

When I do this, I simply change the Atom text editor's grammar to my desired grammar. Go to Atom menu -> Edit -> Select grammar. You can treat that file as an already built-in way to do what you want:

It would be very neat, if Beautify could ask what beautifier to use in this case. The user could select then from a list.

Hope that helps, it works quickly and easily for me when I do exactly what you are doing.

All 5 comments

I think we might have problem with recognizing file type here, but I have the same need.

+1

This is a two part issue:

  • Atom should be attempting to recognize the grammar from the file without using its extension
  • Atom Beautify should popup asking the user which beautifier they want to use, if Atom has been unable to detect the grammar

For this, I'd like to throw it in an unsaved, new file in Atom and just hit "Beautify".

When I do this, I simply change the Atom text editor's grammar to my desired grammar. Go to Atom menu -> Edit -> Select grammar. You can treat that file as an already built-in way to do what you want:

It would be very neat, if Beautify could ask what beautifier to use in this case. The user could select then from a list.

Hope that helps, it works quickly and easily for me when I do exactly what you are doing.

wow that was easy. Thanks @Glavin001

You're welcome :smile:.

Nice, good hint. :)

Was this page helpful?
0 / 5 - 0 ratings