WriteRoom? DarkRoom? MushRoom!

Mark Pilgrim said it best:

I’ve been peripherally following the latest fad of full-screen “writing-focused” text editors. Here’s what I’ve learned so far: in the beginning, there was WriteRoom (Mac OS X, $24.95). WriteRoom is “just about you and your text.” WriteRoom begat DarkRoom (Windows + .NET, $0), which is also “just about you and your text” but requires a 22 MB runtime environment. DarkRoom begat JDarkRoom (Java, $0), which is just about you, your text, and somebody else’s multi-megabyte runtime environment.

Here’s the basic problem: you’re writing a text editor. Stop doing that. It’s 2007. Saying to yourself “I’m gonna build my own text editor” is as silly as saying “I’m gonna build my own build system” or “I’m gonna build my own amusement park.”

Reading the change logs of these programs is like traveling back in time. Way back. Latest changes in JDarkRoom 8: Undo / Redo. Seriously. Version 8, and they now support undo. No offense, but what the fuck?

Anyway, so I had a nose around, and it turns out that Emacs has both undo/redo and very capable full screen capabilities. The EmacsWiki includes the following function, which I've renamed from 'write-room' and tweaked a little for the mac:

;; http://www.emacswiki.org/cgi-bin/wiki/WriteRoom

(defun mush-room ()

"Make a frame without any bling"

(interactive)

(let* ((frame (make-frame '(;; (minibuffer . nil)

(vertical-scroll-bars . nil)

(left-fringe . 235); big fringe to center

(right-fringe . 160)

(background-mode . dark)

(background-color . "black")

(foreground-color . "green")

(cursor-color . "green")

(border-width . 0)

(border-color . "black"); should be unnecessary

(internal-border-width . 20) ; whitespace

(cursor-type . box)

(menu-bar-lines . 0)

(tool-bar-lines . 0)

(mode-line-format . nil); dream on... has no effect

(fullscreen . t); does not work on all systems

(unsplittable . t)))))

(select-frame frame)

(setq mode-line-format nil); is buffer local unfortunately

(set-face-background 'fringe "black")

(set-frame-font gjd-gin-font)

(mac-toggle-max-window)))

I've also added the following auxiliary bits and bobs to make this work well:

(setf gjd-gin-font "-apple-courier ce-medium-r-normal--18-180-72-72-m-180-mac-centraleurroman")

(defun unfullscreen ()

(interactive)

;; restores mode line

(setq mode-line-format (default-value 'mode-line-format))

(set-face-background 'fringe "grey95")

)

(defun delete-frame-and-unfullscreen ()

(interactive)

(delete-frame)

(unfullscreen))

(global-set-key "\M-w" 'delete-frame-and-unfullscreen)





Belongs to these tags