6

I edit markdown text in Emacs fullscreen. Naturally in fullscreen the text flows wider, from left edge of the display to the right, thereby necessitating more eye movements. I want to narrow down the entire text display to, say, 80 characters and position it in centre of the fullscreen Emacs. The emacs buffer should look as if there is unused empty space to the left and right of this centered narrow column of text that is being edited.

What is the simplest way to achieve this? (I could split into 3 buffers, but that's not simpler).

2 Answers2

7

I use writeroom-mode for that. It's available in MELPA.

legoscia
  • 6,012
  • 29
  • 54
4

Bastein (one of the org-mode developers/maintainers) had written a nice blog on how to give minimalistic look to emacs (no mode line, big fringes on the sides) a while ago.

Here is the full code from his gist. You can pick and choose from that based on what you want to implement.

Here is a snippet from his gist that will give you 'narrow column text' or simply a buffer with big fringes.

;; A small minor mode to use a big fringe
(defvar bzg-big-fringe-mode nil)
(define-minor-mode bzg-big-fringe-mode
  "Minor mode to hide the mode-line in the current buffer."
  :init-value nil
  :global t
  :variable bzg-big-fringe-mode
  :group 'editing-basics
  (if (not bzg-big-fringe-mode)
      (set-fringe-style nil)
    (set-fringe-mode
     (/ (- (frame-pixel-width)
           (* 100 (frame-char-width)))
        2))))

;; Now activate this global minor mode
(bzg-big-fringe-mode 1)

Setting the fringe color to suit your default theme:

(custom-set-faces
 '(fringe ((t (:background "white")))))

or

 
(custom-set-faces
  '(default ((t (:background "black" :foreground "grey"))))
  '(fringe ((t (:background "black")))))
Kaushal Modi
  • 25,203
  • 3
  • 74
  • 179