Treehouse: Grow your CSS skills. Land your dream job.

ST 2 question…

  • GMB
    # August 15, 2012 at 2:20 pm

    Apologies in advance for asking a question about Sublime Text in this forum. I relatively new to that program and its forum and have the impression that the latter doesn’t get a lot of traffic. I asked this question there yesterday and it’s gotten a few looks but no responses, so…

    I hit a stumbling block when entering some content on a page yesterday. I wanted to type an “e” with an acute accent — “é.” I’m on Mac and this is usually done by typing “option+e,” then “e.” There are other combinations for other accents:

    option+`, e = “è”
    option+i, e = “ê”
    option+u, e, = “ë”

    The problem is that none of these work in ST, so I was hoping it might be possible to create some key bindings to handle such accented characters. I sniffed around a bit but couldn’t find a solution. Attempted a few of my own but no go.

    Can this be done with key bindings? If so, could someone explain how? As I’ve been using these key combinations for about 25 years, I’d like to stick with them if at all possible.

    Again, apologies for posting this here, and thanks in advance for any help.

    # August 15, 2012 at 2:57 pm

    Well, I found a solution. Here are key bindings for the accents used in French, minus the cédille (“ç”) which already works, and that allow me to keep the traditional Mac key combinations mentioned above:

    { "keys": ["alt+`,a"], "command": "insert", "args": {"characters": "à"} },
    { "keys": ["alt+i,a"], "command": "insert", "args": {"characters": "â"} },
    { "keys": ["alt+e,e"], "command": "insert", "args": {"characters": "é"} },
    { "keys": ["alt+`,e"], "command": "insert", "args": {"characters": "è"} },
    { "keys": ["alt+i,e"], "command": "insert", "args": {"characters": "ê"} },
    { "keys": ["alt+`,e"], "command": "insert", "args": {"characters": "ë"} },
    { "keys": ["alt+u,i"], "command": "insert", "args": {"characters": "ï"} },
    { "keys": ["alt+i,i"], "command": "insert", "args": {"characters": "î"} },
    { "keys": ["alt+i,o"], "command": "insert", "args": {"characters": "ô"} },
    { "keys": ["alt+`,u"], "command": "insert", "args": {"characters": "ù"} },
    { "keys": ["alt+i,u"], "command": "insert", "args": {"characters": "û"} },
    { "keys": ["alt+u,u"], "command": "insert", "args": {"characters": "ü"} }

    Note that these are for lower case characters only. Upper case could be easily added, as could the accented characters of other languages. I will probably get around to them as needed.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.