On Mon, January 7, 2013 11:12, Andy Wokula wrote: > Am 07.01.2013 10:51, schrieb Marco: >> I'm trying to match words containing characters beyond a-zA-Z. The >> problem is that words like >> >> prästgården >> treúã >> >> are not recognized as words. If I match \v(\w+) on these words, >> prästgården is matched three times and treúã is matched only at the >> beginning: >> >> prästgården >> ^^ ^^^ ^^^^ >> treúã >> ^^^ >> >> So the problem is that characters like å are not recognized as a >> character. Checking the words with [:alpha:] proves this, it does >> not match any of the characters åúã. :h regex tells me that >> [:alpha:] matches *letters*. For me å is a letter, not so for vim. >> >> How to convince vim to treat characters like åúã as letters? On [1] >> it was suggested to resort to Perl. But I can hardly believe that >> it's not possible natively in vim. >> >> [1] >> http://unix.stackexchange.com/questions/60481/match-word-containing-characters-beyond-a-za-z > > The word motion w moves over those characters. > :h w > :h word > :h 'isk > :h /\k > > Also, [:upper:] and [:lower:] include more characters. Try > /\c[[:lower:]]\+ > > to match lower *and* upper characters. >
It still doesn't match úã (Is this a bug?). However, you could possibly use equivalence classes like /[[=s=][=c=][=a=]], which you can read about at :h /[[= regards, Christian -- 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
