textmatesymbols

How do you do the "therefore" (∴) symbol on a Mac or in Textmate?


Is there a way to write the ∴ therefore symbol with keyboard shortcuts in Textmate or just on a mac?


Solution

  • If you want to do this often, you can create a keybindings file in your Library to map it to a key combination.

    In ~/Library create a directory named KeyBindings. Create a file named DefaultKeyBinding.dict inside the directory. You can add key bindings in this format:

    {
        "x" = (insertText:, "\U23CF");
        "y" = (insertText:, "hi"); /* warning: this will change 'y' to 'hi'! */
    }
    

    The LHS is the key combination you'll hit to enter the character. You can use the following characters to indicate command keys:

    @ - Command
    
    ~ - Option
    
    ^ - Control
    

    You'll need to look up the unicode for your character (in this case, ∴ is \U2234). So to type this character whenever you typed Control-M, you'd use

    "^m" = (insertText:, "\U2234");
    

    You can find more information here: http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html