Tuesday, November 1, 2016

Re: What is the blank char in my file?

2016-11-01 12:28 GMT+03:00 Francis (Grizzly) Smit <grizzly@smit.id.au>:
>
>
> On 01/11/16 20:03, 李哲 wrote:
>>
>> 在 2016年11月1日星期二 UTC+8下午5:00:37,李哲写道:
>>>
>>> As the pic say~
>>>
>>> I find a blank char in my file but I can't match it by \s+, I want to
>>> delete it, what should I do?
>>
>> The blank char I want to delete is at the beginning of the line, the
>> highlight char is matched by \s but the blank at the beginning not be
>> highlighted
>>
> looks to me like it's a unicode char that you lack the fonts to show try
> googles noto family of fonts

Unicode character without glyphs in used fonts is normally shown as
something like U+FFFD REPLACEMENT CHARACTER (usually either a
rectangle or a white question mark in black rhomb, GTK apps have a
habit of representing this as a square with four hex digits inside).
This looks more like a unicode whitespace character, `\s` does not
match even rather common U+00A0 NO-BREAK SPACE (common enough to have
&listchars suboption that allows displaying it differently from
regular space), not to mention U+2000 EN QUAD .. U+200A HAIR SPACE or
other space characters above this range.

To check what your space actually is (and thus how you can match it
with something like `\%u00A0` (example will match U+00A0)) place
cursor on one of such spaces and type `ga`, this will show something
like

< > 160, Hex 00a0, Octal 240

, you need "Hex" value.

>
> --
>
> .~. In my life God comes first....
> /V\ but Linux is pretty high after that :-D
> /( )\ Francis (Grizzly) Smit
> ^^-^^ http://www.smit.id.au/
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P+++ L+++$ E--- W+++
> N w--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ DI(+) D-
> G e++ h+ y? r% z---
> ------END GEEK CODE BLOCK------
> http://www.geekcode.com/
>
>
> --
> --
> You received this message from the "vim_use" 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_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: