* sergeevabc <vim-dev-git...@256bit.org> [171114 08:15]:
> @10110111, stumbled upon your comment accidentally and decided to test on my 
> end.
> ```
> $ set LC_ALL=ru_RU.utf8
> 
> $ grep --version
> grep (GNU grep) 3.0
> 
> $ echo Ёжик под зелёной ёлкой. | grep --color "[а-яА-Я ]"
> Ёжик под зелёной ёлкой.
> ^           ^    ^    ^
> ```
> Ё, ё and . are not painted red.

In vim patterns, [a-z] is a character range, not a character class.  It
specifically searches for characters whose code values are within the
range.  Ё and ё are outside the range [а-яА-Я ] for both cp1251 and
utf-8.

If you read at :help /collections and go down to the discussion of
character classes, you will notice that it has character classes for
[:alpha:], [:lower:], and [:upper:], among others.  It also says

  These items only work for 8-bit characters, except [:lower:] and
  [:upper:] also work for multi-byte characters when using the new
  regexp engine.

It suggests using [[:lower:][:upper:]] to do something close to what you
want (it will also find non-Russian letters).  The help does not mention
any character class that includes exactly Russian letters, so the best
you are going to be able to do is [А-яЁё].

Vim's regexp engine is working as defined; the fact that Unicode and
cp1251 do not have all the Russian alphabetic characters in a single
range is the issue.  You could request that a character class be added
to do what you want; if you can also provide a patch, that would
significantly increase the chance that the feature would be added.

...Marvin

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui