Re: 'list', :list, and 'listchars'
Christian Brabandt <cblists <at> 256bit.org>
2011-02-01 07:29:25 GMT
On Sat, January 29, 2011 10:59 am, Andy Wokula wrote:
> Am 26.01.2011 18:41, schrieb Ben Fritz:
>>> From looking at :list, it seems like it's basically supposed to print
>> the line as it would show with 'list' turned on. However, I have a few
>> :help :list says it will use '^' for unprintable characters, and
>> additionally says "This can be changed with the 'listchars' option.
>> However, there does not seem to be any 'listchars' option controlling
>> the display of unprintable characters. What does setting 'list' do for
>> unprintable characters? Anything?
>> :help :list only mentions EOL and unprintable behavior, but
>> experimentation shows that "trail", "extends", and "tab" also apply
>> from 'listchars'. "precedes" and "extends" certainly would not make
>> sense in this context, but what about "nbsp" and "conceal"?
>> Experimentation shows that these two options do not have any effect.
>> Should they? I could understand "conceal" having no effect, but I
>> would certainly expect "nbsp" to apply, since "trail", etc. all apply.
> Unprintable characters basically are control characters
> :h 'isprint
> Tab is a control character - when 'listchars' does not include
> 'tab:xy', then tab will be printed as '^I'.
> "nbsp" was added recently, maybe just forgotten to be implemented for
> :list ...
> :list is such a rarely used command ...
Here is a patch, that adds nbsp support to :list command. I leave out