有没有人有 LightTable 的备忘单,对于 paredit 插件来说甚至更好,看来我的 google-fu 无法找到一个?
4 回答
我认为 LightTable 的通用备忘单还不存在!但是对于 paredit 插件...我希望以下内容有所帮助
Paredit 命令
- :paredit.unwrap.parent
(a b (c | d) e) => (a b c | d e)
- :paredit.grow.left
(a b (c | d) e) => (a (b c | d))
- :paredit.grow.right
(a b (c | d) e) => (a b (c | d e))
- :paredit.shrink.left
(a b (c | d) e) => (a b c | (d) e)
- :paredit.shrink.right
(a b (c | d) e) => (a b (c) | d e)
- :paredit.move.up.forward
(a b (c | d) e) => (a b (c d)| e)
- :paredit.move.up.backward
(a b (c | d) e) => (a b |(c d) e)
- :paredit.move.down.forward
(a b | (c d) e) => (a b (|c d) e)
- :paredit.move.down.backward
(a b (c d) | e) => (a b (c d|) e)
绑定键
要绑定键,首先打开用户键映射(设置:用户键映射),然后为要在其中进行 paredit 绑定的编辑器添加绑定条目。
例如,我将它们绑定在所有编辑器中,所以我的键盘映射的相关位是:
{:+ {:app { ...}
:editor { ...
"ctrl-shift-right" [:paredit.grow.right]
"ctrl-shift-left" [:paredit.shrink.right]
"ctrl-right" [:paredit.shrink.left]
"ctrl-left" [:paredit.grow.left]}}
:- {}}
大多数动作发生在您按下 CTRL + Space 时,所有命令都在其中。只需键入一个关键字,即可获得所有选项。
我认为您想将 paredit 中的“常规”键盘绑定绑定到 lighttable。这很容易:
- 按 CTRL + 空格键
- 类型
Settings
- 你得到一个实际上有 5 个项目的列表。选择“默认键盘映射”(或“用户键盘映射”)
- 你得到一个哈希映射,其中设置了迄今为止的键绑定
在这里您可以编辑您的 paredit 插件并绑定您想要使用的命令。对于 paredit,我添加到我的默认键盘映射中:
:editor {"ctrl-left" [:paredit.shrink.right]
"ctrl-right" [:paredit.grow.right]
"ctrl-s" [:paredit.unwrap.parent]}
paredit.shrink.right
如果您按 CTRL + Space 并键入 ,则可以找到类似的值paredit
。由于上面有 3 个示例,您可以想象其他命令的样子:
“Paredit:向右收缩”是关键字:paredit.shrink.right
我很确定我在互联网上找到了写下这些命令的列表,但我现在找不到。但是,如果您知道如何将其“转换”为关键字,则只需使用 CTRL + Space 即可找到所需的所有命令。
当您在键绑定上正确绑定关键字时,您可以在命令列表 CTRL + Space 中看到此绑定。
考虑到这一点,您实际上有一些类似 Cheatsheet 的东西,打印为绑定和操作的地图。希望这可以帮助 ;-)
只是因为其他人还没有说出来。您可以将多个操作绑定到一个快捷方式,因为操作存储在列表中:
:editor {"ctrl-shift-up" [:paredit.grow.right :paredit.shrink.right]
"ctrl-right-down" [:paredit.shrink.left :paredit.grow.left]}
我在搜索默认键绑定的备忘单时找到了此页面,但现有答案仅集中在 paredit 上。我不断搜索并最终在命令窗格中发现了命令“设置:默认键盘映射”。此命令显示所有默认键绑定,用于内联评估、在查找和替换期间导航匹配项以及导航选项卡等任务。以下是截至 2017 年 4 月的默认键绑定:
[:app "pmeta-shift-f" :searcher.show]
[:app "ctrl-space" :show-commandbar-transient]
[:app "pmeta-shift-n" :window.new]
[:app "pmeta-shift-o" :open-file]
[:app "pmeta--" :window.zoom-out]
[:app "pmeta-n" :new-file]
[:app "ctrl-shift-d" :docs.search.show]
[:app "pmeta-o" :navigate-workspace-transient]
[:app "pmeta-shift-=" :window.zoom-in]
[:app "pmeta-=" :window.zoom-in]
[:app "pmeta-0" :window.zoom-reset]
[:app "pmeta-r" :refresh-connected-browser]
[:app "f11" :window.fullscreen]
[:browser "pmeta-l" :browser.url-bar.focus]
[:browser.url-bar "esc" :browser.focus-content]
[:browser.url-bar "enter" :browser.url-bar.navigate!]
[:editor "pmeta-enter" :eval-editor-form]
[:editor "ctrl-d" :editor.doc.toggle]
[:editor "ctrl-," :editor.unjump]
[:editor "ctrl-." :editor.jump-to-definition-at-cursor]
[:editor "pmeta-shift-s" :save-as]
[:editor "pmeta-l" :goto-line]
[:editor "pmeta-shift-enter" :eval-editor]
[:editor "ctrl-=" :editor.fold-code]
[:editor "pmeta-s" :save]
[:editor "pmeta-/" :toggle-comment-selection]
[:editor.keys.hinting.active "enter" :passthrough]
[:editor.keys.normal "pmeta-shift-g" :find.prev]
[:editor.keys.normal "pmeta-f" :find.fill-selection :find.show]
[:editor.keys.normal "pmeta-g" :find.next]
[:editor.keys.normal "tab" :auto-complete]
[:editor.keys.normal "backspace" :passthrough :editor.backspace-indent]
[:filter-list.input "down" (:filter-list.input.move-selection 1)]
[:filter-list.input "esc" (:filter-list.input.escape! :force)]
[:filter-list.input "enter" :filter-list.input.select!]
[:filter-list.input "up" (:filter-list.input.move-selection -1)]
[:find-bar "pmeta-shift-g" :find.prev]
[:find-bar "shift-enter" :find.prev]
[:find-bar "pmeta-g" :find.next]
[:find-bar "esc" :find.clear :find.hide]
[:find-bar "enter" :find.next]
[:find-bar.replace "pmeta-enter" :find.replace-all]
[:find-bar.replace "pmeta-shift-g" :find.prev]
[:find-bar.replace "pmeta-g" :find.next]
[:find-bar.replace "esc" :find.clear :find.hide]
[:find-bar.replace "enter" :find.replace]
[:options-input "esc" :options-input.escape!]
[:options-input "enter" :options-input.select!]
[:plugin-manager.search "enter" :plugin-manager.search]
[:popup "left" (:popup.move-active 1)]
[:popup "shift-tab" (:popup.move-active -1)]
[:popup "esc" (:popup.escape)]
[:popup "tab" (:popup.move-active 1)]
[:popup "enter" (:popup.exec-active)]
[:popup "right" (:popup.move-active -1)]
[:popup.input "left" :passthrough]
[:popup.input "right" :passthrough]
[:searcher.location "enter" :searcher.search]
[:searcher.replace "pmeta-enter" :searcher.replace-all]
[:searcher.search "enter" :searcher.search]
[:sidebar.clients "esc" :show-connect]
[:sidebar.doc.search.input "esc" :docs.search.hide]
[:sidebar.doc.search.input "enter" :docs.search.exec]
[:tabs "pmeta-8" (:tabs.goto 7)]
[:tabs "pmeta-9" (:tabs.goto :last)]
[:tabs "ctrl-shift-tab" :tabs.prev]
[:tabs "ctrl-tab" :tabs.next]
[:tabs "pmeta-shift-[" :tabs.prev]
[:tabs "pmeta-1" (:tabs.goto 0)]
[:tabs "pmeta-shift-]" :tabs.next]
[:tabs "pmeta-2" (:tabs.goto 1)]
[:tabs "pmeta-3" (:tabs.goto 2)]
[:tabs "pmeta-4" (:tabs.goto 3)]
[:tabs "pmeta-5" (:tabs.goto 4)]
[:tabs "pmeta-6" (:tabs.goto 5)]
[:tabs "pmeta-7" (:tabs.goto 6)]
[:tabs "pmeta-w" :tabs.close]
[:tree.rename "esc" :workspace.rename.cancel!]
[:tree.rename "enter" :workspace.rename.submit!]
希望这可以帮助某人。