On Mon, May 20, 2019 at 1:31 PM Antony Scriven <[email protected]> wrote:
>
> Hi!
>
>  > Solution:   Only use the "extends" character when 'list' is on. (Hirohito
>  >             Higashi, closes #4360)
>
> This change may be consistent, but is it helpful?
>
> It seems to me that extends and precedes provide basic UI
> feedback akin to a scrollbar or the 'display' option, rather
> than displaying special characters differently. I, and one
> other I've spoken to, like to know if there is text hidden
> off-screen, without having to keep 'list' enabled.
>
> Is anyone else bugged by this change, or does everyone
> 'wrap' religiously?
>
> Warm regards, --Antony
>
I wrap, but not religiously, and in particular I don't wrap diffs, and
I set 'list' on because I want to see several of the 'listchars'
options, including a visible end-of-line, visible tabs and visible
no-break spaces. So I also customize 'listchars' in my vimrc.

The way I understand it, and the way it's documented, 'listchars' is
used in two cases:
a) to display ordinary editfile text when 'list' is on
b) to display the output of the :list command.

AFAIR it has been like this since before I started using Vim.

Most of the possible 'listchars' settings have a defaut which means
that, when omitted, that particular setting will default to what Vim
does when 'list' is off, with at least one exception: the hard tab.
When 'list' is off, a hard tab is displayed as one or more spaces
until the next character is at an abscissa which (if the first
position in a line is 1) is one more than a multiple of 'tabstop'.
When 'list' is on and 'listchars' does not include "tab:", a hard tab
is represented by the two characters ^I. To get the default behaviour
with 'list' on (and for instance some other nondefault setting) you
need

        :set lcs+=tab:\ \

i.e. two backslash-escaped spaces. (I use tab:\|_ which is stored as
|_ and gives one vertical bar plus zero or more underscores.)

If you want to see precedes and extends, and default the rest, you may use

        :set list lcs=tab:\ \ ,extends:>,precedes:<

IIUC this should give you the same behaviour as with 'nolist' except
that long lines will have a < at the left margin and/or a > at the
right margin depending on which part of the line is displayed. Of
course, if you prefer other characters, the choice is unlimited. With
'encodiing' set to utf-8 (and, I suppose, a "scriptencoding utf-8"
statement near the top of your utf8-encoded vimrc), another possible
setting would be

        :set list lcs=tab:\ \ ,extends:→,precedes:←

Or you may (like me) go whole hog and use

        if exists('+list')
         set list
         if exists('+listchars')
           set lcs=eol:¶,tab:\|_,extends:>,precedes:<,conceal:*,nbsp:·
         endif
        endif

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAJkCKXuxngHpBy2VUgaV3VDQg8oSMraYOqFPHGY0-m33RnD6yw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui