diff --git a/src/app/editor.cljs b/src/app/editor.cljs index 6469e35..870f0c2 100644 --- a/src/app/editor.cljs +++ b/src/app/editor.cljs @@ -52,6 +52,8 @@ #js [(cm-clj/syntax live-grammar/parser) (.slice editor-extensions-to-load 1)] editor-extensions-to-load)) + ;; enable formatting by Tab key + (.of view/keymap (.filter cm-clj/complete-keymap #(= "Tab" (aget % "key")))) #_(.of view/keymap cm-clj/complete-keymap) #_(.of view/keymap historyKeymap)]))) diff --git a/src/app/problem.cljs b/src/app/problem.cljs index 475636c..fd141a8 100644 --- a/src/app/problem.cljs +++ b/src/app/problem.cljs @@ -154,9 +154,9 @@ (reset! editor-extension-mode extension-mode))]] [:p {:style {:margin-top "1rem"}} [:small - "Alt+Enter will eval the local form in the editor box above. There are + "Alt+Enter will eval the local form in the editor box above, and Tab will format the code. There are lots of nifty such features and keybindings. More docs coming soon! (Try - playing with alt + arrows / ctrl + enter) in the meanwhile. + playing with alt + arrows / ctrl + enter / tab) in the meanwhile. For documentation try e.g. (doc map)."]] [modal/box {:is-open success-modal-is-open :on-close success-modal-on-close}