Search code examples
sublimetext3syntax-highlightingaiml

Converting current document's syntax highlighting based on it's extension in Sublime Text 3


As AIML syntax isn't available for Sublime Text (which is normal because AIML is basically XML), is there a way to automatically convert all .aiml files opened by Sublime Text 3 to XML syntax highlighting (some sort of script to do this)? Whenever I have to reopen Sublime Text syntax highlighting restarts and I need to set highlighting from plain text to XML on every file.


Solution

  • With an .aiml file open in ST3, and the syntax highlighting set to XML:

    • (Build 3118 onwards:) From the Preferences menu -> Syntax Specific:
    • (Build 3114 and older:) From the Preferences menu -> Settings - More -> Syntax Specific - User

    Paste in or type the following, so that the contents of the file look like:

    {
        "extensions": ["aiml"]
    }
    

    And save it, and all .aiml files opened from now on should be highlighted as XML automatically.