On Tue, 24 Aug 2010, ZyX wrote: > The following code should echo the same result, but it does not unless > file contains no combining acute accents. > :echo search('\%u0301') " will echo number of line with acute accent > :echo search('[\u0301]') " will always echo 0 > The following works just fine (both echoes 0): > :echo match("\u0301", '\%u0301') > :echo match("\u0301", '[\u0301]') > Tested both on vim-7.3 from gentoo repos and vim-7.3/2577:073ff46fe397.
Note, though, that this also echoes 0: :echo match("e\u0301", '\%u0301') And this echoes -1: :echo match("e\u0301", '[\u0301]') It seems to me one or the other of \%uNNNN or [\uNNNN] is being 'smart' about combining characters, and my guess is that [\u0301] only matches at the beginning of a string because the combining acute has nothing which with to combine. -- Best, Ben -- 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