Does anyone have a cheatsheet for LightTable, even better for the paredit plugin, it seems my google-fu is not up to finding one?
I don't think a general cheat sheet for LightTable exists yet! But for the paredit plugin...I hope the following helps
(a b (c | d) e) => (a b c | d e)
(a b (c | d) e) => (a (b c | d))
(a b (c | d) e) => (a b (c | d e))
(a b (c | d) e) => (a b c | (d) e)
(a b (c | d) e) => (a b (c) | d e)
(a b (c | d) e) => (a b (c d)| e)
(a b (c | d) e) => (a b |(c d) e)
(a b | (c d) e) => (a b (|c d) e)
(a b (c d) | e) => (a b (c d|) e)
To bind the keys, first open user keymap (Settings: User Keymap), and then add binding entries in for the editors in which you want paredit bindings.
e.g. I have them bound in all editors, so the relevant bit of my keymap is:
{:+ {:app { ...}
:editor { ...
"ctrl-shift-right" [:paredit.grow.right]
"ctrl-shift-left" [:paredit.shrink.right]
"ctrl-right" [:paredit.shrink.left]
"ctrl-left" [:paredit.grow.left]}}
:- {}}
Most of the action happens, when you hit CTRL + Space so you get all commands in there. Just type a keyword and you get all options for it.
I think you want to bind the "usual" keyboard bindings from paredit into lighttable. That's very easy:
Settings
Here you can edit your paredit plugin and bind the commands you would like to use. For paredit I added to my default keymap:
:editor {"ctrl-left" [:paredit.shrink.right]
"ctrl-right" [:paredit.grow.right]
"ctrl-s" [:paredit.unwrap.parent]}
Values like paredit.shrink.right
can be found if you hit CTRL + Space and type paredit
. As you have 3 examples above, you can just think of how the other commands would look like:
"Paredit: Shrink right" is the keyword :paredit.shrink.right
I am pretty sure that I found a list in the internet where those commands were written down, but I can't find it at this moment. But if you know how to "convert" it to keywords, you can just use CTRL + Space to find all commands you need.
When you correctly bound a keyword on a keybinding you can see this binding in the command list CTRL + Space.
With this in your mind, you actually have something like a Cheatsheet printed as a map of bindings and actions. Hope this helps ;-)
Only because the others have not said it yet. You can bind multiple actions to one shortcut as the actions are stored in a list:
:editor {"ctrl-shift-up" [:paredit.grow.right :paredit.shrink.right]
"ctrl-right-down" [:paredit.shrink.left :paredit.grow.left]}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With