2

If I type ( I get () but that doesn't work for { or [. Any Idea why?

What should I do to make it work?

BTW, I am using a French Canadian keyboard (Mac OSX).

Thanks!

leontalbot
  • 2,513
  • 1
  • 23
  • 32
  • 2
    Sounds like a bug in LT to me, but you can always post your question to its mailing list [Light Table Discussion](https://groups.google.com/forum/#!forum/light-table-discussion), there are a lot of helpful people there. – juan.facorro Apr 13 '14 at 19:09

3 Answers3

4

You need to put something like this on your keymap:

{:+ {:editor {"alt-[" [(:editor.open-pair "[")]
              "alt-shift-[" [(:editor.open-pair "{")]
              "alt-]" [(:editor.close-pair "]")]
              "alt-shift-]" [(:editor.close-pair "}")]}}}

Reference: https://github.com/LightTable/LightTable/issues/620#issuecomment-30319095

mynomoto
  • 96
  • 2
  • Doing this actually make `[]` work but when I type `{` i get also `[]`. :S I'm on a Mac. – leontalbot Apr 14 '14 at 21:30
  • I actually only use us keyboards, but I helped for a while triaging issues on the Lighttable project. But if the comments of that issue don't help, I'm clueless. – mynomoto Apr 14 '14 at 22:46
0

This feature is already implemented in the new version of LT:

:editor.keys.normal {"\"" [(:editor.repeat-pair "\"")]
                    "(" [(:editor.open-pair "(")]
                    ")" [(:editor.close-pair ")")]                          
                    "[" [(:editor.open-pair "[")]
                    "{" [(:editor.open-pair "{")]
                    "]" [(:editor.close-pair "]")]
                    "}" [(:editor.close-pair "}")]
Sufian
  • 6,405
  • 16
  • 66
  • 120
0

This is a solution for Croatian keyboard layout (add it to user.keymap file):

{:+ {:app {}    
     :editor {"ctrl-alt-f" [(:editor.open-pair "[")]
              "ctrl-alt-b" [(:editor.open-pair "{")]
              "ctrl-alt-g" [(:editor.close-pair "]")]
              "ctrl-alt-n" [(:editor.close-pair "}")]}}}
Marko Bonaci
  • 5,622
  • 2
  • 34
  • 55