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

Very magic search

Expand Messages
  • Jiri Brezina
    Hallo, when I am searching for literal patern, is best magic setting, without question. But when search is for regexp, very magic serching seems be better
    Message 1 of 4 , Jan 31, 2002
    • 0 Attachment
      Hallo,
      when I'am searching for literal patern, is best 'magic' setting,
      without question. But when search is for regexp, 'very magic'
      serching seems be better one: it save many backslashes and its
      more similar to 'egrep' and friends.

      Well, but in vim isn't any switch (am I right?) for 'very magic' [eg. ":set
      vmagic", or better ":set magic=(v|V|m|M)" ], only is possible switch it on by
      "\v" string. For searching of many regexps is possible remap ":nmap / /\v",
      but when is timeoutlen set, vim is waiting for shortcut. And when is set eg.
      ":cmap vb vert sbuffer" by calamitous error searching string for word which
      starts with 'b' is expanded to "/\vert sbuffer".

      I try write function which remap 'tm' to lower value and after serching back,
      but it works no so good for me.

      Have anyone solution for this?
      Thanks
      Have a really nice Day

      --
      JiriB*

      "If people do not believe that mathematics is simple, it is only
      because they do not realize how complicated life is."
      -- John von Neumann
    • Jiri Brezina
      Hallo, I hope that isn t so much shame reply to my own mail... ... In friday I made some mistake, I by some nasty accident thought that ... It works perfect,
      Message 2 of 4 , Feb 4, 2002
      • 0 Attachment
        Hallo,
        I hope that isn't so much shame reply to my own mail...

        > when is set eg. ":cmap vb vert sbuffer" by calamitous error searching
        > string for word which starts with 'b' is expanded to "/\vert sbuffer"

        In friday I made some mistake, I by some nasty accident thought that
        :nnoremap in search patterns had didn't work...
        It works perfect, of course (it's vim, indeed :) and only my first
        question is staying: is in vim any other way to switch on 'very
        magic search' permanently, than ":nnoremap / /\v" ?

        Have a nice Day

        --
        JiriB*

        [heard song "My mistake", performed by Terry 'Guisseppe' Jones]
      • Benji Fisher
        ... I do not think so, and if you did then it would break many scripts. I, for one, do not want to have to rewrite $VIMRUNTIME/macros/matchit.vim so that it
        Message 3 of 4 , Feb 4, 2002
        • 0 Attachment
          Jiri Brezina wrote:
          >
          > Hallo,
          > I hope that isn't so much shame reply to my own mail...
          >
          > > when is set eg. ":cmap vb vert sbuffer" by calamitous error searching
          > > string for word which starts with 'b' is expanded to "/\vert sbuffer"
          >
          > In friday I made some mistake, I by some nasty accident thought that
          > :nnoremap in search patterns had didn't work...
          > It works perfect, of course (it's vim, indeed :) and only my first
          > question is staying: is in vim any other way to switch on 'very
          > magic search' permanently, than ":nnoremap / /\v" ?
          >
          > Have a nice Day

          I do not think so, and if you did then it would break many scripts. I,
          for one, do not want to have to rewrite $VIMRUNTIME/macros/matchit.vim so that
          it is immune to the setting of 'magic'. (No rest for the weary... ;)

          --Benji Fisher
        • Jiri Brezina
          BF I do not think so, and if you did then it would break many scripts. BF I, for one, do not want to have to rewrite $VIMRUNTIME/macros/matchit.vim BF so
          Message 4 of 4 , Feb 4, 2002
          • 0 Attachment
            BF> I do not think so, and if you did then it would break many scripts.
            BF> I, for one, do not want to have to rewrite $VIMRUNTIME/macros/matchit.vim
            BF> so that it is immune to the setting of 'magic' (No rest for the weary... ;)

            Thank you for Your reply,
            I know, that setting to other value than default, i.e. 'magic' is really
            dangerous; but when is 'very magic' possibility here, why don't use it?
            When I need find many regexp, why don't use 'very magic' setting,
            which is in vim? It save many backslashes and when I'am using egrep,
            it seems more consistent...

            Have a nice Day

            --
            JiriB*

            "SQL standard? probably in sci-fi section..."
          Your message has been successfully submitted and would be delivered to recipients shortly.