unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Vi-like end of buffer in emacs?
Date: Sat, 03 Jan 2009 09:23:57 -0700	[thread overview]
Message-ID: <gjo3e3$6o1$1@ger.gmane.org> (raw)
In-Reply-To: <m7G7l.99839$Af2.78918@fe02.news.easynews.com>

wlcna wrote:
> "Ian Eure" <ian@digg.com> 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





  parent reply	other threads:[~2009-01-03 16:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-01 23:24 Vi-like end of buffer in emacs? wlcna
2009-01-02  8:47 ` Chetan
2009-01-02 16:56 ` Ian Eure
     [not found] ` <mailman.3767.1230915404.26697.help-gnu-emacs@gnu.org>
2009-01-03  9:22   ` wlcna
2009-01-03 11:07     ` Ian Eure
2009-01-03 16:23     ` Kevin Rodgers [this message]
     [not found]     ` <mailman.3836.1230999825.26697.help-gnu-emacs@gnu.org>
2009-01-04  6:55       ` wlcna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gjo3e3$6o1$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).