vscode Beautify Extension doesn't work in html - html

why the Beautify extension doesn't work on html files?
maybe there is some way to set this extension to work on html files?

There are two ways to format code using beautify.
Using command palette (Manually)
Open command palette using Ctrl+Shift+P or Command+P on macOS and
search
format document with
Enter and select document formatter.
Change default settings (Automatically)
Go to the settings.
Search :
editor.defaultFormatter
Change the default formatter, then the code will be automatically formatted whenever you save the file.

Related

I downloaded my chrome bookmarks to move to a new computer and it saved as a XML instead of HTML - when I try to convert i get an error

I tried using several conversions -- I've used Altova and a couple of other free software options. I don't know how to add the XML file for you to view but would really appreciate some help!
When I use the Export Bookmarks option on Chrome browser, by default, the only option it allows is to save as an HTML file. If you did mistakenly save as an XML file, then using an XML editor like use probably used from Altova will most likely create more errors.
1) I'd suggest, you first right-click on the XML bookmarks file and go to Properties tab and see if you can restore the oldest, least-modified version of it.
2) Then simply try renaming the extension of the bookmarks file from .xml to .html to see if it now works.

How can I reformat Source Code for files without file extension in WebStorm 2016.1.3?

How can I reformat Source Code for files without file extension in WebStorm 2016.1.3 ?
Example: I've a automated_generated_json_file_without_extension in one line and the name of the files are always different. I don't want to configure all these file names in "File Types" Dialog and register new patterns.
In Sublime you can change the file type at the right bottom corner, is there a similar function in WebStorm?
Unfortunately you cannot change file type of the file on the fly in WebStorm.
Possible workarounds:
Have a set of files (e.g. test.json, test.js etc) somewhere in a project where you can copy-paste this file content, reformat it there and copy it back.
Use "Scratch files" functionality (Tools | New Scratch File...) and then the same copy-paste content to reformat.

A PHP script file doesn't have PHP syntax formatting

In my PhpStorm, the file index.php, doesn't look like a PHP script, but a plain text file. How can I fix it?
Settings | File Types | Text files
Find and remove unwanted pattern there -- I expect this to be index.php or very similar
Similar SO questions:
PHPStorm renders a particular file name as plain text
Pycharm utils.py not getting syntax highlight
Follow this steps:
Open PHPStorm settings by using Ctrl+Alt+S
In search box type File types
Select file types option from left side panel
Find PHP Files (PHP) from Recognized file types
Check for .php extension in below area (Registered Patterns). If not found add PHP.
Right click on index.php and select "Mark as PHP".
(This option is there on PHPStorm 7.x, I'm not sure about 6.)

Compound file extension syntax coloring with Sublime Text 2

I have some files with the extension "js.php" that I would like Sublime to automatically treat as Javascript files not PHP files. Is this possible?
I tried adding "extensions": ["js.php"] to my user settings and then setting View->Syntax->Open All With Current Extension As ->Javascript (while a js.php file was open) but all files with just a .php extension were opened as Javascript files too.
Take a look at the ApplySyntax plugin. It was written to handle just such a scenario.

How do I enable code formatting for JSON in Zend Studio?

I would like to enjoy code formatting for .json files in Zend Studio. I have tried associating the .json extension with the JavaScript editor, but this has no effect, and Ctrl+Shift+F simply does nothing.
How can I achieve what I want?
You have to add the file types in "Content Types" as well as in "File Associations", as in:
https://support.zend.com/hc/en-us/articles/203838106-How-to-Add-File-Types-to-the-PHP-Editor