2

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
  • 1,540
  • 1
  • 12
  • 28
  • I'm having the same problem, but ctrl modifier works: {:+ {:app {"pmeta-ctrl-s" [:save-all]}} It's not nearly as nice, though. I'm used to shift. – Marc Jan 25 '14 at 11:34
  • Using `ctrl-shift-s` didn't work either. I don't think it's properly loading my user.keymap. – dOxxx Jan 27 '14 at 02:27

1 Answers1

3

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]}}}}
dOxxx
  • 1,540
  • 1
  • 12
  • 28