2014-04-13 112 views
2

如果我输入(,我会得到(),但这对{[不起作用。任何想法为什么?如何让Light Table自动关闭大括号和方括号?

我该怎么做才能使它工作?

顺便说一句,我正在使用法语加拿大键盘(Mac OSX)。

谢谢!

+2

听起来像是LT中的一个错误,但您可以随时将您的问题发布到其邮件列表[轻量表讨论](https://groups.google.com/forum/#!forum/light-table讨论),那里有很多有帮助的人。 –

+0

@ juan.facorro会做!谢谢! – leontalbot

回答

4

你需要把这样的事情在你的键盘布局

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

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

+0

这样做实际上使'[]'工作,但是当我输入'{'我也得到'[]'。 :S我在Mac上。 – leontalbot

+0

我实际上只使用我们的键盘,但我帮助了一段时间在Lighttable项目上分类问题。但如果这个问题的评论没有帮助,我很无能。 – mynomoto

0

该功能在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 "}")] 
0

这是克罗地亚键盘布局的解决方案(将其添加到user.keymap文件中):

{:+ {: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 "}")]}}}