Home > Blockchain >  How can I format HTML code in tpl files in Vscode
How can I format HTML code in tpl files in Vscode

Time:01-26

how can I turn on snippets and html code formater in .tpl files? I will using Vscode to edit PrestaShop files where is a lot of html code inside .tpl files.

Format html code inside .tpl file

CodePudding user response:

You can try these steps:-

  1. First check for any extension available in vscode market place. If it is available then you can proceed with it.
  2. The second option, which is manually configuring Visual Studio Code to handle ".tpl" files, can be done by following these steps:
  • Go to Settings editor, search for "files.associations" and click on the Edit in settings.json link.
  • In the settings.json file, add the following line of code: "* .tpl": "html"

This tells Visual Studio Code to associate the ".tpl" file type with the "html" language mode.

  1. You can edit the file extension to .html to work with the html code formatter.
  • Related