     (keyPressed [this e]
       (let [k (convert-key-event e)
             p (exec-paredit k w)]
-        (if p (.consume e) (exec-pprint k w))))))
+        (if p (.consume e) (exec-format k w))))))
 
 (defn input-method-event-handler [w]
   (reify java.awt.event.InputMethodListener


(declare sexp-dup)

(defn reformat-all-forms [s] 
  (let [rvec (map (fn [[offs p]]
                    (let [len (v/length p)]

                      (recur diff-sum (rest rl)))))))

(def formatting-keymap
  {["M" "p"] :fmt-pprint ["M" "f"] :fmt-plain})

(defn exec-format [k widget]
  (let [cmd (formatting-keymap k)]
    (if cmd
      (let [sel (.getSelectedText widget)]
        (when sel
        (cond
          (= cmd :fmt-pprint) 
            (.replaceRange widget (reformat-all-forms sel) (.getSelectionStart widget) (.getSelectionEnd widget))
          (= cmd :fmt-plain)
            (.replaceRange widget (format-code sel) (.getSelectionStart widget) (.getSelectionEnd widget))))))))

(defn exec-paredit [k w]
  (let [cmd (keymap k)]
