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

Re: Migrating text from vim to wysiwyg editor

Expand Messages
  • jcordes
    ... Hi Christian, I tried inserting an empty line at the top of the file, but am still experiencing the E147: Cannot do :global recursive If I keep the empty
    Message 1 of 21 , Feb 2, 2013
    • 0 Attachment
      On Saturday, 2 February 2013 17:29:45 UTC-4, Christian Brabandt wrote:
      > Hi jcordes!
      >
      >
      >
      > On Sa, 02 Feb 2013, jcordes wrote:
      >
      >
      >
      > > On Saturday, 2 February 2013 16:09:17 UTC-4, jcordes wrote:
      >
      > > > On Saturday, 2 February 2013 14:40:47 UTC-4, Tim Chase wrote:
      >
      > > > > On Sat, 2 Feb 2013 10:27:27 -0800 (PST), jcordes wrote:
      >
      > > > >
      >
      > > > > > On Friday, 1 February 2013 23:46:03 UTC-4, Tim Chase wrote:
      >
      > > > >
      >
      > > > > > > You could do something like
      >
      > > > >
      >
      > > > > > > :g/^\</'{+,'}-j
      >
      > > > >
      >
      > > > > >
      >
      > > > >
      >
      > > > > > Thanks very much for posting this. Your explanation (in a later
      >
      > > > >
      >
      > > > > > post) makes a lot of sense,
      >
      > > > >
      >
      > > > > > but for some reason I keep coming up
      >
      > > > > > with an 'invalid range' error when I use :g/^\</'{+,'}-j
      >
      > > > >
      >
      > > > > The only way I was able to trigger this was if either:
      >
      > > > >
      >
      > > > > 1) your relative-range happens to be swapped (such that the 2nd line
      >
      > > > > comes before the first line), or
      >
      > > > >
      >
      > > > > 2) if your file only has one line in it.
      >
      > > > >
      >
      > > > > I might be able to better determine what's going on if you can
      >
      > > > > produce a sample file against which I could test.
      >
      > > >
      >
      > > > Tim, and Christian:
      >
      > > >
      >
      > > > I have reduced the file to something very short - however, at some point the error changed to E147: Cannot do :global recursive. Here is the short version:
      >
      > > >
      >
      > > > ###########
      >
      > > > 2010.09.06
      >
      > > >
      >
      > > > Enter more city directory data - I already have quite a lot for my family in
      >
      > > > spreadsheets.
      >
      > > >
      >
      > > > ###########
      >
      > > >
      >
      > > > There are 5 lines, the last one being empty. Lines 3 and 4 are each terminated by a LF.
      >
      > > >
      >
      > > > I'm not sure if I may be misunderstanding the original proposal, to do
      >
      > > > :g/^\</'{+,'}-j
      >
      > > >
      >
      > > > Was it intended that the entire file should be visually selected first? I hadn't thought so.
      >
      > > >
      >
      > > > Thanks for your assistance,
      >
      > > > John
      >
      > >
      >
      > > Sorry for the repost - I just realized I should have attached the test file. Have done so in this message.
      >
      > > John
      >
      > >
      >
      >
      >
      > > 2010.09.06
      >
      > >
      >
      > > Enter more city directory data - I already have quite a lot for my family in
      >
      > > spreadsheets.
      >
      > >
      >
      >
      >
      > I think, this happens, because there is no empty first line in your
      >
      > file. Simply add an empty first line in front of everything and I
      >
      > believe the :g command works.
      >
      >
      >
      >
      >
      > regards,
      >
      > Christian

      Hi Christian,

      I tried inserting an empty line at the top of the file, but am still experiencing the E147: Cannot do :global recursive

      If I keep the empty top line and visually select the entire file, then the command works as expected. This also works for the original file I was working with. So in summary, inserting an empty line at the top *and* visually selecting the entire file enables the command to work.
      Perhaps I misunderstood the original message and it was intended to select the whole file first.

      Thanks,
      John Cordes


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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • vim@...
      ... It looks like it s the first line causing trouble. So I d expand my caveat to have a blank line at both the top and bottom of the file . I think it
      Message 2 of 21 , Feb 2, 2013
      • 0 Attachment
        > I have reduced the file to something very short - however, at some
        > point the error changed to E147: Cannot do :global recursive. Here
        > is the short version:
        >
        > ###########
        > 2010.09.06
        >
        > Enter more city directory data - I already have quite a lot for my
        > family in spreadsheets.
        >
        > ###########

        It looks like it's the first line causing trouble. So I'd expand my
        caveat to "have a blank line at both the top and bottom of the
        file". I think it stems from the '{ mark being the first line rather
        than the zero'th line, so when you add one to it, it points to line
        #2, coming *after* the '}-minus-one line (the top solitary line of
        text)

        Usually the E147 about ":global recursive" gets triggered when you
        try something like

        :g/pattern1/.;+5g/pattern2/d

        where you try to do a ":g" as the Ex command issued by an outer :g
        command. I couldn't find the help-target on that one off the top of
        my head (the help for E147 doesn't give anything on how to remedy
        that error).

        -tim


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

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • jcordes
        ... Thank you Tim. John -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For
        Message 3 of 21 , Feb 4, 2013
        • 0 Attachment
          On Saturday, 2 February 2013 19:55:58 UTC-4, Tim Chase wrote:

          > > ###########
          >
          > > 2010.09.06
          >
          > >
          >
          > > Enter more city directory data - I already have quite a lot for my
          >
          > > family in spreadsheets.
          >
          > >
          >
          > > ###########
          >
          >
          >
          > It looks like it's the first line causing trouble. So I'd expand my
          >
          > caveat to "have a blank line at both the top and bottom of the
          >
          > file". I think it stems from the '{ mark being the first line rather
          >
          > than the zero'th line, so when you add one to it, it points to line
          >
          > #2, coming *after* the '}-minus-one line (the top solitary line of
          >
          > text)
          >
          >
          >
          > Usually the E147 about ":global recursive" gets triggered when you
          >
          > try something like
          >
          >
          >
          > :g/pattern1/.;+5g/pattern2/d
          >
          >
          >
          > where you try to do a ":g" as the Ex command issued by an outer :g
          >
          > command. I couldn't find the help-target on that one off the top of
          >
          > my head (the help for E147 doesn't give anything on how to remedy
          >
          > that error).
          >
          >
          >
          > -tim

          Thank you Tim.

          John

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

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+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.