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

Documentation for /ordinary-atom missing \*?

Expand Messages
  • Nico Weber
    Hi, you can use * to match a literal * (with magic set). I can t find this mentioned anywhere in the documentation. User error or missing documentation?
    Message 1 of 2 , Jan 13, 2008
    • 0 Attachment
      Hi,

      you can use '\*' to match a literal '*' (with 'magic' set). I can't
      find this mentioned anywhere in the documentation. User error or
      missing documentation?

      Thanks,
      Nico

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... It might be useful to mention it there, but it is not really missing: look ... IOW, any character which (like *) has a special meaning in a pattern when
      Message 2 of 2 , Jan 13, 2008
      • 0 Attachment
        Nico Weber wrote:
        > Hi,
        >
        > you can use '\*' to match a literal '*' (with 'magic' set). I can't
        > find this mentioned anywhere in the documentation. User error or
        > missing documentation?
        >
        > Thanks,
        > Nico

        It might be useful to mention it there, but it is not really missing: look
        under ":help /magic" and you'll see:

        > 3. Magic */magic*
        >
        > Some characters in the pattern are taken literally. They match with the same
        > character in the text. When preceded with a backslash however, these
        > characters get a special meaning.
        >
        > Other characters have a special meaning without a backslash. They need to be
        > preceded with a backslash to match literally.
        >
        > If a character is taken literally or not depends on the 'magic' option and the
        > items mentioned next.

        IOW, any character which (like *) has a special meaning in a pattern when it's
        not backslash-escaped, will match itself when it is, and any character which
        has a special meaning when it is, will match itself when it isn't. Which is
        which depends on the 'magic' option, and on whether atoms in the pattern
        itself set it to very magic, magic, nomagic or very nomagic.


        Best regards,
        Tony.
        --
        Quidquid latine dictum sit, altum viditur.

        (Whatever is said in Latin sounds profound.)

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.