Default Syntax for a given file extension

customization

#1

Hi the community,

I’ve working for the first time on a prestashop project.

Templates are written in smarty, and their extension are “.tpl”.

Unfortunately, each time I open a template, the syntax used by Cloud9 is HandleBars.

Is ther a way to configure my workspace so when I open a “.tpl” file, it use “Smarty” syntax ?

Thanks a lot

Hervé


#2

in your user settings "ace" "custom-types" section add `“tpl”: “smarty”

it should look something like

"ace": {
    ....
    "custom-types": {
        "json()": {
            "tpl": "smarty"
        }
    },
}

How to change default syntax highlighter based on extension
Need xml properties for my own file extensions like .msp , .mmd, .mmr,etc
#3

This works fine,

Thanks a lot @harutyun


#4

I tried with that code but it’s not working, I just pasted that code in load() function…was it correct? If not please give us working code for myplugin.js file.

My main intention is to know where i need to put that code in .js file

Thanks,
Shiva.


#5

is there any way to write plugin to modify user.settings file


#6

i can not find “ace” "custom-types"section in my user settings. The interface seems updated. Can anyone share your experience?


#7

@duping812 are you talking about the json file or the ui? The custom-types is only in the json file.


#8

@harutyun I am talking about the ui, workspace on c9.io. Can you tell me what is the json file?


#9

use cloud9>open your user settings menu item to open settings as a json file