* Vi-like end of buffer in emacs?
@ 2009-01-01 23:24 wlcna
2009-01-02 8:47 ` Chetan
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: wlcna @ 2009-01-01 23:24 UTC (permalink / raw)
To: help-gnu-emacs
Is there a way to get emacs to show something like the squiggles that vi
shows under the last line of text in the file? The ideal behavior is Vim
under GUI, which shows that but also *just slightly* changes the background
color with the squiggles. This is not a huge deal but I find it comforting
to know exact information about the file, including how many line
terminations I have in there, and this is an instantaneous way of telling
that.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Vi-like end of buffer in emacs?
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>
2 siblings, 0 replies; 7+ messages in thread
From: Chetan @ 2009-01-02 8:47 UTC (permalink / raw)
To: help-gnu-emacs
"wlcna" <wlcna@nospam.invalid> writes:
> Is there a way to get emacs to show something like the squiggles that vi shows
> under the last line of text in the file? The ideal behavior is Vim under GUI,
> which shows that but also *just slightly* changes the background color with the
> squiggles. This is not a huge deal but I find it comforting to know exact
> information about the file, including how many line terminations I have in
> there, and this is an instantaneous way of telling that.
I don't really use vi to know what you are looking for. However, there
are ways to configure and show buffer endings and empty lines and
such. If you search this newsgroup's recent history, you can find the
information. You can also browse the customizations with M-x
customize. There are a lot of them to list here. I don't know of
anything comparable in vi, so you are on your own there.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Vi-like end of buffer in emacs?
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>
2 siblings, 0 replies; 7+ messages in thread
From: Ian Eure @ 2009-01-02 16:56 UTC (permalink / raw)
To: wlcna; +Cc: help-gnu-emacs
On Jan 1, 2009, at 3:24 PM, wlcna wrote:
> Is there a way to get emacs to show something like the squiggles
> that vi shows under the last line of text in the file? The ideal
> behavior is Vim under GUI, which shows that but also *just slightly*
> changes the background color with the squiggles. This is not a
> huge deal but I find it comforting to know exact information about
> the file, including how many line terminations I have in there, and
> this is an instantaneous way of telling that.
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.
- Ian
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.3767.1230915404.26697.help-gnu-emacs@gnu.org>]
* Re: Vi-like end of buffer in emacs?
[not found] ` <mailman.3767.1230915404.26697.help-gnu-emacs@gnu.org>
@ 2009-01-03 9:22 ` wlcna
2009-01-03 11:07 ` Ian Eure
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: wlcna @ 2009-01-03 9:22 UTC (permalink / raw)
To: help-gnu-emacs
"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...
But thanks very much, it works.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Vi-like end of buffer in emacs?
2009-01-03 9:22 ` wlcna
@ 2009-01-03 11:07 ` Ian Eure
2009-01-03 16:23 ` Kevin Rodgers
[not found] ` <mailman.3836.1230999825.26697.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 7+ messages in thread
From: Ian Eure @ 2009-01-03 11:07 UTC (permalink / raw)
To: wlcna; +Cc: help-gnu-emacs
On Jan 3, 2009, at 1:22 AM, 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...
>
Anything you set via customize can be done with elisp. Open fringe.el
and look for (defcustom). Alternately, you can pull the definitions
out of the (custom-set-variables) block and make them regular (setq)
calls.
Nothing wrong with customize, in my opinion.
- Ian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Vi-like end of buffer in emacs?
2009-01-03 9:22 ` wlcna
2009-01-03 11:07 ` Ian Eure
@ 2009-01-03 16:23 ` Kevin Rodgers
[not found] ` <mailman.3836.1230999825.26697.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2009-01-03 16:23 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.3836.1230999825.26697.help-gnu-emacs@gnu.org>]
* Re: Vi-like end of buffer in emacs?
[not found] ` <mailman.3836.1230999825.26697.help-gnu-emacs@gnu.org>
@ 2009-01-04 6:55 ` wlcna
0 siblings, 0 replies; 7+ messages in thread
From: wlcna @ 2009-01-04 6:55 UTC (permalink / raw)
To: help-gnu-emacs
"Kevin Rodgers" <kevin.d.rodgers@gmail.com> wrote...
> 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
> )
>
NICER THAN WHAT I HAD! THANKS! It's in my init file.
> 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")))))
Looks better, I put that in there too. Nicer. I just wish now it didn't
show one two many lines of these marks, and as mentioned, still doesn't have
the vim bg color slight adjustment (in gui vim) either, but hey, it's
getting there! Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-01-04 6:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[not found] ` <mailman.3836.1230999825.26697.help-gnu-emacs@gnu.org>
2009-01-04 6:55 ` wlcna
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).