1

I have recently run into the following use case in LightTable:

  • I want to execute a command (for instance, duplicate a line)
  • I press "Ctrl-Space" and a list of commands shows up
  • I select the command I need
  • I want to repeat this command often, but there is no keybinding for this command
  • I go to user.keymap where I am supposed to add a line like [:editor "alt-shift-w" :editor.watch.unwatch]
  • But I have no idea what is the :editor.watch.unwatch-like key for the command I have just found. All I know is the displayed name of this command: Editor: duplicate line

Is there a way to add this keybinding without digging up the documentation and finding the key?

0x60
  • 3,104
  • 1
  • 15
  • 18

1 Answers1

1

If you add the beginning of a line like this to your user.keymap:

[:editor "alt-shift-w" 

and position the keyboard cursor at the end of the line you should be able to type duplicate line and the relevant command should be listed in a popup autocomplete menu.

Kenny Evitt
  • 9,291
  • 5
  • 65
  • 93
  • 1
    It worked! What tripped me up is you have to just type `"alt-shift-w"` (or any other key comdination), type a space and start typing the name of the command. If you type the semicolon, however, the popup switches from [nice user-readable names](https://dl.dropboxusercontent.com/u/26359914/user-readable.PNG) to [Clojure keys](https://dl.dropboxusercontent.com/u/26359914/non-user-readable.PNG). – 0x60 Aug 07 '16 at 15:36