visual-studio-codevscode-extensionsvscode-tasks

VS Code: convert accented characters to HTML automatically


Editing an HTML file in Visual Studio Code, when I type école I want it to be replaced with école without doing any other action. What is the best solution?


Solution

  • Well, I'll offer this as a solution but you would have to do a lot of work to set it up first. But since no one else has offered anything, how about snippets:

    "Print e-acute": {
        "prefix": "é",
        "body": [
            "é"
        ],
        "description": "replace é with é"
    }
    

    I've tested it and it works. But there are a lot of html character entity references to input. If you were really good you could make a program to grab the list and create the snippets for entities 161-255 automatically. I'm surprised there isn't an extension already available for this.