Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to add file extension in adobe-brackets editor ?

I am using files with .html.eco extension in my web project and I am trying to edit in Adobe Brackets but I can't specify that it should treat this as HTML file, to provide the typical features of editing html file (like color support, grammar, etc.).

In fact I noticed that this is possible when changing languages.json file, however I am using the binary version and I didn't build from source.

https://github.com/adobe/brackets/blob/master/src/language/languages.json

Any help ?

like image 646
João Paraná Avatar asked Feb 13 '14 12:02

João Paraná


People also ask

Why did Adobe discontinue Brackets?

Brackets has a major focus on development in JavaScript-enabled, CSS and HTML. With release of version 1.0, Adobe announced a feature that extracts design information from a PSD file for convenience of coding in CSS. As of June 28, 2016, the feature is officially discontinued, due to low usage.

How do I manually install Emmet in Brackets?

Open the adobe brackets editor. Click on the file and then click on the Extension Manager or directly click on the extension button in the top right corner. Then click on the extension button and search for Emmet. Click on the Install button.

How do I run a PHP file in Brackets?

Locate the folder with the name as htdocs inside the XAMPP installation. Create your PHP Project Folder here with any name such as myphpproject. Go to Brackets editor and navigate to File -> Open Folder and open the myphpproject folder. The shortcut is Ctrl + Alt + O.


1 Answers

Update: this is now much easier to do:

  1. Open the .html.eco file
  2. In the status bar (lower-right), click the dropdown that says "Text"
  3. Select the "HTML" option
  4. Open the dropdown again and select the "Set as Default" option at the top

Original answer:

There's a backlog item for making this easily configurable (please upvote!), but in the meantime you can do it by writing a very simple Brackets extension:

define(function (require, exports, module) {
    var LanguageManager = brackets.getModule("language/LanguageManager");
    var language = LanguageManager.getLanguage("html");
    language.addFileExtension("html.eco");
});
  1. Put this code in a file named main.js
  2. In Brackets, go to Help > Show Extensions Folder
  3. Create a new folder under user, and place the main.js file inside it
  4. Restart Brackets

Here's more info on writing Brackets extensions, if you're curious.

like image 158
peterflynn Avatar answered Sep 30 '22 16:09

peterflynn