help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vi-like end of buffer in emacs?


From: Kevin Rodgers
Subject: Re: Vi-like end of buffer in emacs?
Date: Sat, 03 Jan 2009 09:23:57 -0700
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

wlcna wrote:
"Ian Eure" <address@hidden> wrote...
You want fringe-mode. M-x customize-group RET fringe RET.

It doesn't show actual characters in the buffer like vi does, but has a graphic on the edge.


Thanks! I figured someone probably had an easy fix for this. I tried it out a bit. Not as nice as vim, but it's OK. Not sure why it shows the little marks on the last line of the file when you can type on that line, but it's OK.

I noticed though that I have to have this customize group thing instead of more straightforwardly using lisp to set this in my init file code... (fringe-mode) can be put in my init file, but the only argument is the size of the fringe and no args for fact that I want to show empty lines.

But anyway, customize works, though I avoid that customize stuff, just coming back to emacs now - it irks me and seems opposed to the idea of all the lisp integration...

All you need is: (setq-default indicate-empty-lines t)

For my customization, I prefer the Emacs 21 empty line glyphs:

(when (fboundp 'define-fringe-bitmap)
(define-fringe-bitmap 'empty-line [0 0 #x3c #x3c #x3c #x3c 0 0]) ; Emacs 21
  )

And less obtrusive color:

(when (display-color-p)
  (let ((bg-mode (frame-parameter (selected-frame) 'background-mode)))
    (cond ((eq bg-mode 'light)
           (set-face-foreground 'fringe "grey60"))
          ((eq bg-mode 'dark)
           (set-face-foreground 'fringe "grey40")))))

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]