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.

--
Andy

--
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

Reply via email to