13. Key bindings

clojure
(bind-key! "C-c g" 'find-file)          ; global key
(unbind-key! "C-c g")
(prefix-name! "C-c l" "lsp")            ; prefix name shown by which-key
代码

Key syntax follows Emacs: `C-`, `M-`, and `S-` modifiers, and sequences such as
`"C-x C-f"` separated by spaces. Command names are symbols (the names shown in `M-x`).
Define your own command:
clojure
(defcommand my-hello "Say hello." [ed]
  (ed/message ed "hello!"))
(bind-key! "C-c h" 'my-hello)
代码

Raw Markdown: coxn manual (Markdown) · Installers: coxn product page