Loading ...
Sorry, an error occurred while loading the content.
 

regexp: \p doesn't match double width character

Expand Messages
  • Yukihiro Nakadaira
    p doesn t match double width character. And its behavior depends on ambiwidth option. ... -1 ... 0 ... -1 -- Yukihiro Nakadaira -
    Message 1 of 2 , Jul 18, 2013
      \p doesn't match double width character.
      And its behavior depends on 'ambiwidth' option.

      :set encoding=utf-8
      :echo match("\u3042", '\p')     " HIRAGANA LETTER A
      -1
      :set ambiwidth=single
      :echo match("\u00EC", '\p')     " LATIN SMALL LETTER I WITH GRAVE
      0
      :set ambiwidth=double
      :echo match("\u00EC", '\p')
      -1

      --
      Yukihiro Nakadaira - yukihiro.nakadaira@...

      --
      --
      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+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • Bram Moolenaar
      ... I ll add it to the todo list. -- Often you re less important than your furniture. If you think about it, you can get fired but your furniture stays
      Message 2 of 2 , Jul 20, 2013
        Yukihiro Nakadaira wrote:

        > \p doesn't match double width character.
        > And its behavior depends on 'ambiwidth' option.
        >
        > :set encoding=utf-8
        > :echo match("\u3042", '\p') " HIRAGANA LETTER A
        > -1
        > :set ambiwidth=single
        > :echo match("\u00EC", '\p') " LATIN SMALL LETTER I WITH GRAVE
        > 0
        > :set ambiwidth=double
        > :echo match("\u00EC", '\p')
        > -1

        I'll add it to the todo list.

        --
        Often you're less important than your furniture. If you think about it, you
        can get fired but your furniture stays behind, gainfully employed at the
        company that didn't need _you_ anymore.
        (Scott Adams - The Dilbert principle)

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        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+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.