7
Clojure/Script mode for CodeMirror 6
source link: https://nextjournal.github.io/clojure-mode/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Try evaluating any of these forms with Alt + ⏎ !
In-browser eval is powered by Sci.
(comment
(fizz-buzz 1)
(fizz-buzz 3)
(fizz-buzz 5)
(fizz-buzz 15)
(fizz-buzz 17)
(fizz-buzz 42))
(defn fizz-buzz [n]
(condp (fn [a b] (zero? (mod b a))) n
15 "fizzbuzz"
3 "fizz"
5 "buzz"
#'user/fizz-buzz
Command | Keybinding | Alternate Binding | Description |
---|---|---|---|
barf-backward | Ctrl + Alt + → | Shrink collection backwards by one form | |
barf-forward | Ctrl + ← | Ctrl + Shift + j | Shrink collection forwards by one form |
enter-and-indent | Enter | Insert newline and indent | |
eval-at-cursor | Alt + Enter | Evaluates form at cursor | |
eval-cell | Ctrl + Enter | Evaluate cell | |
eval-top-level | Alt + Shift + Enter | Evaluates top-level form at cursor | |
indent | Tab | Indent document (or selection) | |
kill | Ctrl + k | Remove all forms from cursor to end of line | |
nav-left | Alt + ← | Move cursor one unit to the left (shift: selects this region) | |
nav-select-left | Shift + Alt + ← | ||
nav-right | Alt + → | Move cursor one unit to the right (shift: selects this region) | |
nav-select-right | Shift + Alt + → | ||
selection-grow | Alt + ↑ | Ctrl + 1 | Grow selections |
selection-return | Alt + ↓ | Ctrl + 2 | Shrink selections |
slurp-backward | Ctrl + Alt + ← | Grow collection backwards by one form | |
slurp-forward | Ctrl + → | Ctrl + Shift + k | Expand collection to include form to the right |
unwrap | Alt + s | Lift contents of collection into parent |
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK