How do I override a default keybinding in LightTable?

dOxxx

The default.keymap has pmeta-shift-s bound to :save-as but I would like to rebind it to :save-all. I added the following to my user.keymap:

;; Remove the default keybinding
{:- {:editor {"pmeta-shift-s" [:save-as]}}}

;; Add my keybinding
{:+ {:app {"pmeta-shift-s" [:save-all]}}}

I've saved my user.keymap and LightTable says that it's reloaded the keymap, but pressing pmeta-shift-s still pops up the Save As dialog. What am I doing wrong?

EDIT: I'm fairly convinced this is a bug, so: https://github.com/LightTable/LightTable/issues/1180

dOxxx

Apparently it was not a bug, the :- and :+ keys must appear in the same map:

{:- {:editor {"pmeta-shift-s" [:save-as]}}

 :+ {:app {"pmeta-shift-s" [:save-all]}

     :editor {"alt-w" [:editor.watch.watch-selection]
              "alt-shift-w" [:editor.watch.unwatch]
              "f3" [:find.next]}

     :tabs {"pmeta-pagedown" [:tabs.next]
            "pmeta-pageup" [:tabs.prev]}}}}

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类常见问题

How do I resolve ClassNotFoundException?

来自分类Dev

How do I define the size of a CollectionView on rotate

来自分类Dev

How do I write a custom module for AngularJS?

来自分类Dev

How do I count selected checkboxes in Angular?

来自分类Dev

I do not understand how execlp() works in Linux

来自分类Dev

How can I override the set axios override defaults on specific requests?

来自分类Dev

How do i sort my listview alphabetically?

来自分类Dev

Passing File with intent, how do i retrieve it

来自分类Dev

How do I include jquery in javafx webview?

来自分类Dev

keyBinding中的焦点导航

来自分类Dev

How do I iterate over a file?

来自分类Dev

How do I combine lenses and functors?

来自分类Dev

How do I parse JSON in Racket?

来自分类Dev

How do I convert synchronous ajax to asynchronous?

来自分类Dev

How do I modularize polyfills in Angular?

来自分类Dev

How do I link boost to my program?

来自分类Dev

How do I retrieve the text of a cell comment

来自分类Dev

How do I override the response content in a JMeter WebDriver sampler test?

来自分类Dev

LightTable使用什么UI框架?

来自分类Dev

puppet - How do I append to path variable?

来自分类Dev

How do I call an intent in Retrofit Callback?

来自分类Dev

Basic Ocaml: How do I compile this?

来自分类Dev

How do I declare a driver as global?

来自分类Dev

How do I free socket descriptors in RabbitMQ

来自分类Dev

How do I combine three observables such that

来自分类Dev

How do I link to a pdf in AngularJS?

来自分类Dev

How do I parse a RestSharp response into a class?

来自分类Dev

How can I determine the default encoding in a portable class library?

来自分类Dev

KeyListener和KeyBinding问题