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

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

Re: How to show all characters in a specific line


From: Harry Putnam
Subject: Re: How to show all characters in a specific line
Date: Wed, 31 Dec 2014 20:46:22 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

>> In vi/vim on any line and in Command mode if you press :l <RET> you
>> will see any \t, newline and etc.
>
> If you are talking only about whitespace chars then you can use
> `whitespace-mode' to show them highlighted in various ways or
> contexts. See the Emacs manual, node `Useless Whitespace' for more
> information.
>
> You can also use library `highlight-chars.el' to do this.  It lets you
> highlight any characters pretty much any way you like.  It is available
> from MELPA or Emacs Wiki (the wiki is down at the moment, however).

Thanks for the good useful input.

`whitespace-mode' seems to do all I wanted and compared to
`highlight-chars', it is much more readable since it doesn't just put a
fairly opaque blob of color where a tab is used.

(I realize the face is customizable... but by default its fairly blotto
looking to read)

`whitespace-mode' puts an icon of sorts: >> but smaller, for tab and
. for space.  All on a background color of a medium dark grey.

Mush easier on the eyes and easier to ascertain immediately what has
been put down.

But still (And no religious scrap intended) neither of those is really
as readable and handy as vim's :l  Which puts only an icon in the
place of \t (^I). It collapses the whitespace and puts a series of ^I
for however many \t were used.

I don't think a snippet of whitespace-mode or hightlight-chars will
survive mail incoding without creating some kind of image of it, but
the vim look is just common keyboard characters with no higlight:

This:
 rsync_short_args  -avlR
 rsync_long_args   --stats  --delete --numeric-ids  --delete-excluded

Becomes:
 rsync_short_args^I-avlR$
 rsync_long_args^I--stats^I--delete^I--numeric-ids^I--delete-excluded$

Plus by default it does not process the whole buffer. Just the current
line or more if selected.

Its just the rest of vim is not my favorite; so whitespace-mode looks
like the winner.

Thanks again




reply via email to

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