          (or (contains? styles (get-extension path))
              (utils/is-text-file? pathfile)))))
 
-(def ^:dynamic editor-controls [:save :undo :redo :font-dec :font-inc
-                                :doc :paredit :paredit-help :find :replace])
-
-(defn create-control
+(def ^:dynamic editor-widgets [:save :undo :redo :font-dec :font-inc
+                               :doc :paredit :paredit-help :find :replace])
+
+(defn create-widget
   [k]
   (case k
     :save (ui/button :id :save-button

      ; add prompt text to the fields
      (doseq [[id text] {:#find-field (utils/get-string :find)
                         :#replace-field (utils/get-string :replace)}]
        (when-let [control (s/select text-group [id])]
          (doto (TextPrompt. text control)
            (.changeAlpha 0.5))))
      ; update buttons every time a key is typed
      (s/listen text-area

(defn focus-on-field!
  [id]
  (when-let [editor (get-selected-editor)]
    (when-let [widget (s/select editor [id])]
      (doto widget
        s/request-focus!
        .selectAll))))

(defn focus-on-find!
  [_]
