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

indent versus previous line

Expand Messages
  • Ni Va
    Hi, I got a file that contains those lines : s s s s sFOO BAR1 BAR2 END_OF_BLOCK s s s s sFOO2 BAR1 BAR2 END_OF_BLOCK s s s s sFOO3 BAR1 BAR2 END_OF_BLOCK I
    Message 1 of 21 , Jun 10 12:40 AM
    • 0 Attachment
      Hi,


      I got a file that contains those lines :


      \s\s\s\s\sFOO
      BAR1
      BAR2
      END_OF_BLOCK
      \s\s\s\s\sFOO2
      BAR1
      BAR2
      END_OF_BLOCK
      \s\s\s\s\sFOO3
      BAR1
      BAR2
      END_OF_BLOCK


      I would like to indent all sublines of each BLOCK to be like that :

      \s\s\s\s\sFOO
      BAR1
      BAR2
      END_OF_BLOCK
      \s\s\s\s\sFOO2
      BAR1
      BAR2
      END_OF_BLOCK
      \s\s\s\s\sFOO3
      BAR1
      BAR2
      END_OF_BLOCK



      My file contains 500000 lines so it has to be done automatically

      --
      --
      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/d/optout.
    • Christian Brabandt
      ... That should work: v/^ %( s ) {5}/ Best, Christian -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
      Message 2 of 21 , Jun 10 1:30 AM
      • 0 Attachment
        Am 2014-06-10 09:40, schrieb Ni Va:
        > Hi,
        >
        >
        > I got a file that contains those lines :
        >
        >
        > \s\s\s\s\sFOO
        > BAR1
        > BAR2
        > END_OF_BLOCK
        > \s\s\s\s\sFOO2
        > BAR1
        > BAR2
        > END_OF_BLOCK
        > \s\s\s\s\sFOO3
        > BAR1
        > BAR2
        > END_OF_BLOCK
        >
        >
        > I would like to indent all sublines of each BLOCK to be like that :
        >
        > \s\s\s\s\sFOO
        > BAR1
        > BAR2
        > END_OF_BLOCK
        > \s\s\s\s\sFOO2
        > BAR1
        > BAR2
        > END_OF_BLOCK
        > \s\s\s\s\sFOO3
        > BAR1
        > BAR2
        > END_OF_BLOCK
        >
        >
        >
        > My file contains 500000 lines so it has to be done automatically

        That should work:
        v/^\%(\\s\)\{5}/>

        Best,
        Christian

        --
        --
        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/d/optout.
      • Ni Va
        ... Is there another soluce because the file can contains several indent level: s s s s sFOO BAR1 BAR2 END_OF_BLOCK s s s s sFOO2 BAR1 BAR2 END_OF_BLOCK
        Message 3 of 21 , Jun 10 2:10 AM
        • 0 Attachment
          On Tuesday, June 10, 2014 10:30:30 AM UTC+2, Christian Brabandt wrote:
          > Am 2014-06-10 09:40, schrieb Ni Va:
          >
          > > Hi,
          >
          > >
          >
          > >
          >
          > > I got a file that contains those lines :
          >
          > >
          >
          > >
          >
          > > \s\s\s\s\sFOO
          >
          > > BAR1
          >
          > > BAR2
          >
          > > END_OF_BLOCK
          >
          > > \s\s\s\s\sFOO2
          >
          > > BAR1
          >
          > > BAR2
          >
          > > END_OF_BLOCK
          >
          > > \s\s\s\s\sFOO3
          >
          > > BAR1
          >
          > > BAR2
          >
          > > END_OF_BLOCK
          >
          > >
          >
          > >
          >
          > > I would like to indent all sublines of each BLOCK to be like that :
          >
          > >
          >
          > > \s\s\s\s\sFOO
          >
          > > BAR1
          >
          > > BAR2
          >
          > > END_OF_BLOCK
          >
          > > \s\s\s\s\sFOO2
          >
          > > BAR1
          >
          > > BAR2
          >
          > > END_OF_BLOCK
          >
          > > \s\s\s\s\sFOO3
          >
          > > BAR1
          >
          > > BAR2
          >
          > > END_OF_BLOCK
          >
          > >
          >
          > >
          >
          > >
          >
          > > My file contains 500000 lines so it has to be done automatically
          >
          >
          >
          > That should work:
          >
          > v/^\%(\\s\)\{5}/>
          >
          >
          >
          > Best,
          >
          > Christian



          Is there another soluce because the file can contains several indent level:

          \s\s\s\s\sFOO
          BAR1
          BAR2
          END_OF_BLOCK
          \s\s\s\s\sFOO2
          BAR1
          BAR2
          END_OF_BLOCK
          \s\s\s\s\s\s\s\s\sFOO3
          BAR1
          BAR2
          END_OF_BLOCK
          \s\s\sFOO2
          BAR1
          BAR2
          END_OF_BLOCK

          --
          --
          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/d/optout.
        • Christian Brabandt
          ... Adjust the regular expression ;) ... That will indent each line, that does *not* start with s by one shiftwidth. Does that help you? Best, Christian --
          Message 4 of 21 , Jun 10 2:45 AM
          • 0 Attachment
            Am 2014-06-10 11:10, schrieb Ni Va:
            > On Tuesday, June 10, 2014 10:30:30 AM UTC+2, Christian Brabandt wrote:
            >> Am 2014-06-10 09:40, schrieb Ni Va:
            >>
            >> > Hi,
            >>
            >> >
            >>
            >> >
            >>
            >> > I got a file that contains those lines :
            >>
            >> >
            >>
            >> >
            >>
            >> > \s\s\s\s\sFOO
            >>
            >> > BAR1
            >>
            >> > BAR2
            >>
            >> > END_OF_BLOCK
            >>
            >> > \s\s\s\s\sFOO2
            >>
            >> > BAR1
            >>
            >> > BAR2
            >>
            >> > END_OF_BLOCK
            >>
            >> > \s\s\s\s\sFOO3
            >>
            >> > BAR1
            >>
            >> > BAR2
            >>
            >> > END_OF_BLOCK
            >>
            >> >
            >>
            >> >
            >>
            >> > I would like to indent all sublines of each BLOCK to be like that :
            >>
            >> >
            >>
            >> > \s\s\s\s\sFOO
            >>
            >> > BAR1
            >>
            >> > BAR2
            >>
            >> > END_OF_BLOCK
            >>
            >> > \s\s\s\s\sFOO2
            >>
            >> > BAR1
            >>
            >> > BAR2
            >>
            >> > END_OF_BLOCK
            >>
            >> > \s\s\s\s\sFOO3
            >>
            >> > BAR1
            >>
            >> > BAR2
            >>
            >> > END_OF_BLOCK
            >>
            >> >
            >>
            >> >
            >>
            >> >
            >>
            >> > My file contains 500000 lines so it has to be done automatically
            >>
            >>
            >>
            >> That should work:
            >>
            >> v/^\%(\\s\)\{5}/>
            >>
            >>
            >>
            >> Best,
            >>
            >> Christian
            >
            >
            >
            > Is there another soluce because the file can contains several indent
            > level:
            >
            > \s\s\s\s\sFOO
            > BAR1
            > BAR2
            > END_OF_BLOCK
            > \s\s\s\s\sFOO2
            > BAR1
            > BAR2
            > END_OF_BLOCK
            > \s\s\s\s\s\s\s\s\sFOO3
            > BAR1
            > BAR2
            > END_OF_BLOCK
            > \s\s\sFOO2
            > BAR1
            > BAR2
            > END_OF_BLOCK


            Adjust the regular expression ;)
            :v/^\%(\\s\)\+/>
            That will indent each line, that does *not* start with '\s' by one
            shiftwidth.
            Does that help you?

            Best,
            Christian

            --
            --
            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/d/optout.
          • Ni Va
            ... I have triedf with adjusted regex and launching but it take count only of the first line indent. I think there is a mistake in your cmd. I correct by this
            Message 5 of 21 , Jun 10 2:51 AM
            • 0 Attachment
              On Tuesday, June 10, 2014 11:45:35 AM UTC+2, Christian Brabandt wrote:
              > Am 2014-06-10 11:10, schrieb Ni Va:
              >
              > > On Tuesday, June 10, 2014 10:30:30 AM UTC+2, Christian Brabandt wrote:
              >
              > >> Am 2014-06-10 09:40, schrieb Ni Va:
              >
              > >>
              >
              > >> > Hi,
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> > I got a file that contains those lines :
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> > \s\s\s\s\sFOO
              >
              > >>
              >
              > >> > BAR1
              >
              > >>
              >
              > >> > BAR2
              >
              > >>
              >
              > >> > END_OF_BLOCK
              >
              > >>
              >
              > >> > \s\s\s\s\sFOO2
              >
              > >>
              >
              > >> > BAR1
              >
              > >>
              >
              > >> > BAR2
              >
              > >>
              >
              > >> > END_OF_BLOCK
              >
              > >>
              >
              > >> > \s\s\s\s\sFOO3
              >
              > >>
              >
              > >> > BAR1
              >
              > >>
              >
              > >> > BAR2
              >
              > >>
              >
              > >> > END_OF_BLOCK
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> > I would like to indent all sublines of each BLOCK to be like that :
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> > \s\s\s\s\sFOO
              >
              > >>
              >
              > >> > BAR1
              >
              > >>
              >
              > >> > BAR2
              >
              > >>
              >
              > >> > END_OF_BLOCK
              >
              > >>
              >
              > >> > \s\s\s\s\sFOO2
              >
              > >>
              >
              > >> > BAR1
              >
              > >>
              >
              > >> > BAR2
              >
              > >>
              >
              > >> > END_OF_BLOCK
              >
              > >>
              >
              > >> > \s\s\s\s\sFOO3
              >
              > >>
              >
              > >> > BAR1
              >
              > >>
              >
              > >> > BAR2
              >
              > >>
              >
              > >> > END_OF_BLOCK
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> >
              >
              > >>
              >
              > >> > My file contains 500000 lines so it has to be done automatically
              >
              > >>
              >
              > >>
              >
              > >>
              >
              > >> That should work:
              >
              > >>
              >
              > >> v/^\%(\\s\)\{5}/>
              >
              > >>
              >
              > >>
              >
              > >>
              >
              > >> Best,
              >
              > >>
              >
              > >> Christian
              >
              > >
              >
              > >
              >
              > >
              >
              > > Is there another soluce because the file can contains several indent
              >
              > > level:
              >
              > >
              >
              > > \s\s\s\s\sFOO
              >
              > > BAR1
              >
              > > BAR2
              >
              > > END_OF_BLOCK
              >
              > > \s\s\s\s\sFOO2
              >
              > > BAR1
              >
              > > BAR2
              >
              > > END_OF_BLOCK
              >
              > > \s\s\s\s\s\s\s\s\sFOO3
              >
              > > BAR1
              >
              > > BAR2
              >
              > > END_OF_BLOCK
              >
              > > \s\s\sFOO2
              >
              > > BAR1
              >
              > > BAR2
              >
              > > END_OF_BLOCK
              >
              >
              >
              >
              >
              > Adjust the regular expression ;)
              >
              > :v/^\%(\\s\)\+/>
              >
              > That will indent each line, that does *not* start with '\s' by one
              >
              > shiftwidth.
              >
              > Does that help you?
              >
              >
              >
              > Best,
              >
              > Christian

              I have triedf with adjusted regex and launching but it take count only of the first line indent. I think there is a mistake in your cmd. I correct by this one.

              :v/^\%\(\s\)\+/>


              But it does that

              \s\s\sFOO1
              \s\s\sBAR1
              \s\s\sBAR2
              \s\s\s\s\sFOO2
              \s\s\sBAR1
              \s\s\sBAR2
              \s\s\s\s\s\s\sFOO3
              \s\s\sBAR1
              \s\s\sBAR2

              out of that
              \s\s\sFOO1
              \s\s\sBAR1
              \s\s\sBAR2
              \s\s\s\s\sFOO2
              \s\s\s\s\sBAR1
              \s\s\s\s\sBAR2
              \s\s\s\s\s\s\sFOO3
              \s\s\s\s\s\s\sBAR1
              \s\s\s\s\s\s\sBAR2



              --
              --
              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/d/optout.
            • Ellis Kenyo
              Put j3 3j in a buffer ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to.
              Message 6 of 21 , Jun 10 3:10 AM
              • 0 Attachment

                Put j3>>3j in a buffer

                On 10 Jun 2014 08:40, "Ni Va" <nivaemail@...> wrote:
                Hi,


                I got a file that contains those lines :


                \s\s\s\s\sFOO
                BAR1
                BAR2
                END_OF_BLOCK
                \s\s\s\s\sFOO2
                BAR1
                BAR2
                END_OF_BLOCK
                \s\s\s\s\sFOO3
                BAR1
                BAR2
                END_OF_BLOCK


                I would like to indent all sublines of each BLOCK to be like that :

                \s\s\s\s\sFOO
                             BAR1
                             BAR2
                             END_OF_BLOCK
                \s\s\s\s\sFOO2
                             BAR1
                             BAR2
                             END_OF_BLOCK
                \s\s\s\s\sFOO3
                             BAR1
                             BAR2
                             END_OF_BLOCK



                My file contains 500000 lines so it has to be done automatically

                --
                --
                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/d/optout.

                --
                --
                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/d/optout.
              • Ni Va
                ... ???? don t understand the goal. tested without success -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below
                Message 7 of 21 , Jun 10 3:24 AM
                • 0 Attachment
                  On Tuesday, June 10, 2014 12:11:10 PM UTC+2, elken wrote:
                  > Put j3>>3j in a buffer
                  >
                  > On 10 Jun 2014 08:40, "Ni Va" <niva...@...> wrote:
                  >
                  > Hi,
                  >
                  >
                  >
                  >
                  >
                  > I got a file that contains those lines :
                  >
                  >
                  >
                  >
                  >
                  > \s\s\s\s\sFOO
                  >
                  > BAR1
                  >
                  > BAR2
                  >
                  > END_OF_BLOCK
                  >
                  > \s\s\s\s\sFOO2
                  >
                  > BAR1
                  >
                  > BAR2
                  >
                  > END_OF_BLOCK
                  >
                  > \s\s\s\s\sFOO3
                  >
                  > BAR1
                  >
                  > BAR2
                  >
                  > END_OF_BLOCK
                  >
                  >
                  >
                  >
                  >
                  > I would like to indent all sublines of each BLOCK to be like that :
                  >
                  >
                  >
                  > \s\s\s\s\sFOO
                  >
                  >              BAR1
                  >
                  >              BAR2
                  >
                  >              END_OF_BLOCK
                  >
                  > \s\s\s\s\sFOO2
                  >
                  >              BAR1
                  >
                  >              BAR2
                  >
                  >              END_OF_BLOCK
                  >
                  > \s\s\s\s\sFOO3
                  >
                  >              BAR1
                  >
                  >              BAR2
                  >
                  >              END_OF_BLOCK
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  > My file contains 500000 lines so it has to be done automatically
                  >
                  >
                  >
                  > --
                  >
                  > --
                  >
                  > 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+u...@....
                  >
                  > For more options, visit https://groups.google.com/d/optout.

                  ???? don't understand the goal. tested without success

                  --
                  --
                  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/d/optout.
                • Ellis Kenyo
                  Put cursor on first line qqj3 jq Then replay with n@q where n is a number ... -- -- You received this message from the vim_use maillist. Do not top-post!
                  Message 8 of 21 , Jun 10 3:25 AM
                  • 0 Attachment

                    Put cursor on first line

                    qqj3>>jq

                    Then replay with n@q where n is a number

                    On 10 Jun 2014 11:24, "Ni Va" <nivaemail@...> wrote:
                    On Tuesday, June 10, 2014 12:11:10 PM UTC+2, elken wrote:
                    > Put j3>>3j in a buffer
                    >
                    > On 10 Jun 2014 08:40, "Ni Va" <niva...@...> wrote:
                    >
                    > Hi,
                    >
                    >
                    >
                    >
                    >
                    > I got a file that contains those lines :
                    >
                    >
                    >
                    >
                    >
                    > \s\s\s\s\sFOO
                    >
                    > BAR1
                    >
                    > BAR2
                    >
                    > END_OF_BLOCK
                    >
                    > \s\s\s\s\sFOO2
                    >
                    > BAR1
                    >
                    > BAR2
                    >
                    > END_OF_BLOCK
                    >
                    > \s\s\s\s\sFOO3
                    >
                    > BAR1
                    >
                    > BAR2
                    >
                    > END_OF_BLOCK
                    >
                    >
                    >
                    >
                    >
                    > I would like to indent all sublines of each BLOCK to be like that :
                    >
                    >
                    >
                    > \s\s\s\s\sFOO
                    >
                    >              BAR1
                    >
                    >              BAR2
                    >
                    >              END_OF_BLOCK
                    >
                    > \s\s\s\s\sFOO2
                    >
                    >              BAR1
                    >
                    >              BAR2
                    >
                    >              END_OF_BLOCK
                    >
                    > \s\s\s\s\sFOO3
                    >
                    >              BAR1
                    >
                    >              BAR2
                    >
                    >              END_OF_BLOCK
                    >
                    >
                    >
                    >
                    >
                    >
                    >
                    > My file contains 500000 lines so it has to be done automatically
                    >
                    >
                    >
                    > --
                    >
                    > --
                    >
                    > 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+u...@....
                    >
                    > For more options, visit https://groups.google.com/d/optout.

                    ???? don't understand the goal. tested without success

                    --
                    --
                    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/d/optout.

                    --
                    --
                    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/d/optout.
                  • Ellis Kenyo
                    *qqj3 3jq ... -- -- 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
                    Message 9 of 21 , Jun 10 3:26 AM
                    • 0 Attachment

                      *qqj3>>3jq

                      On 10 Jun 2014 11:25, "Ellis Kenyo" <sponge69@...> wrote:

                      Put cursor on first line

                      qqj3>>jq

                      Then replay with n@q where n is a number

                      On 10 Jun 2014 11:24, "Ni Va" <nivaemail@...> wrote:
                      On Tuesday, June 10, 2014 12:11:10 PM UTC+2, elken wrote:
                      > Put j3>>3j in a buffer
                      >
                      > On 10 Jun 2014 08:40, "Ni Va" <niva...@...> wrote:
                      >
                      > Hi,
                      >
                      >
                      >
                      >
                      >
                      > I got a file that contains those lines :
                      >
                      >
                      >
                      >
                      >
                      > \s\s\s\s\sFOO
                      >
                      > BAR1
                      >
                      > BAR2
                      >
                      > END_OF_BLOCK
                      >
                      > \s\s\s\s\sFOO2
                      >
                      > BAR1
                      >
                      > BAR2
                      >
                      > END_OF_BLOCK
                      >
                      > \s\s\s\s\sFOO3
                      >
                      > BAR1
                      >
                      > BAR2
                      >
                      > END_OF_BLOCK
                      >
                      >
                      >
                      >
                      >
                      > I would like to indent all sublines of each BLOCK to be like that :
                      >
                      >
                      >
                      > \s\s\s\s\sFOO
                      >
                      >              BAR1
                      >
                      >              BAR2
                      >
                      >              END_OF_BLOCK
                      >
                      > \s\s\s\s\sFOO2
                      >
                      >              BAR1
                      >
                      >              BAR2
                      >
                      >              END_OF_BLOCK
                      >
                      > \s\s\s\s\sFOO3
                      >
                      >              BAR1
                      >
                      >              BAR2
                      >
                      >              END_OF_BLOCK
                      >
                      >
                      >
                      >
                      >
                      >
                      >
                      > My file contains 500000 lines so it has to be done automatically
                      >
                      >
                      >
                      > --
                      >
                      > --
                      >
                      > 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+u...@....
                      >
                      > For more options, visit https://groups.google.com/d/optout.

                      ???? don't understand the goal. tested without success

                      --
                      --
                      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/d/optout.

                      --
                      --
                      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/d/optout.
                    • Ni Va
                      I prefer a command like Christian than repeat a macro ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below
                      Message 10 of 21 , Jun 10 3:27 AM
                      • 0 Attachment
                        I prefer a command like Christian than repeat a macro

                        On Tuesday, June 10, 2014 12:26:33 PM UTC+2, elken wrote:
                        > *qqj3>>3jq
                        >
                        >
                        >
                        > On 10 Jun 2014 11:25, "Ellis Kenyo" <spon...@...> wrote:
                        >
                        >
                        > Put cursor on first line
                        >
                        > qqj3>>jq
                        >
                        > Then replay with n@q where n is a number
                        >
                        > On 10 Jun 2014 11:24, "Ni Va" <niva...@...> wrote:
                        >
                        >
                        > On Tuesday, June 10, 2014 12:11:10 PM UTC+2, elken wrote:
                        >
                        > > Put j3>>3j in a buffer
                        >
                        > >
                        >
                        > > On 10 Jun 2014 08:40, "Ni Va" <niva...@...> wrote:
                        >
                        > >
                        >
                        > > Hi,
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > > I got a file that contains those lines :
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > > \s\s\s\s\sFOO
                        >
                        > >
                        >
                        > > BAR1
                        >
                        > >
                        >
                        > > BAR2
                        >
                        > >
                        >
                        > > END_OF_BLOCK
                        >
                        > >
                        >
                        > > \s\s\s\s\sFOO2
                        >
                        > >
                        >
                        > > BAR1
                        >
                        > >
                        >
                        > > BAR2
                        >
                        > >
                        >
                        > > END_OF_BLOCK
                        >
                        > >
                        >
                        > > \s\s\s\s\sFOO3
                        >
                        > >
                        >
                        > > BAR1
                        >
                        > >
                        >
                        > > BAR2
                        >
                        > >
                        >
                        > > END_OF_BLOCK
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > > I would like to indent all sublines of each BLOCK to be like that :
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > > \s\s\s\s\sFOO
                        >
                        > >
                        >
                        > >              BAR1
                        >
                        > >
                        >
                        > >              BAR2
                        >
                        > >
                        >
                        > >              END_OF_BLOCK
                        >
                        > >
                        >
                        > > \s\s\s\s\sFOO2
                        >
                        > >
                        >
                        > >              BAR1
                        >
                        > >
                        >
                        > >              BAR2
                        >
                        > >
                        >
                        > >              END_OF_BLOCK
                        >
                        > >
                        >
                        > > \s\s\s\s\sFOO3
                        >
                        > >
                        >
                        > >              BAR1
                        >
                        > >
                        >
                        > >              BAR2
                        >
                        > >
                        >
                        > >              END_OF_BLOCK
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > > My file contains 500000 lines so it has to be done automatically
                        >
                        > >
                        >
                        > >
                        >
                        > >
                        >
                        > > --
                        >
                        > >
                        >
                        > > --
                        >
                        > >
                        >
                        > > 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+u...@....
                        >
                        > >
                        >
                        > > For more options, visit https://groups.google.com/d/optout.
                        >
                        >
                        >
                        > ???? don't understand the goal. tested without success
                        >
                        >
                        >
                        > --
                        >
                        > --
                        >
                        > 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+u...@....
                        >
                        > For more options, visit https://groups.google.com/d/optout.

                        --
                        --
                        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/d/optout.
                      • Ellis Kenyo
                        1000@q and you re done... ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to.
                        Message 11 of 21 , Jun 10 3:28 AM
                        • 0 Attachment

                          1000@q and you're done...

                          On 10 Jun 2014 11:27, "Ni Va" <nivaemail@...> wrote:
                          I prefer a command like Christian than repeat a macro

                          On Tuesday, June 10, 2014 12:26:33 PM UTC+2, elken wrote:
                          > *qqj3>>3jq
                          >
                          >
                          >
                          > On 10 Jun 2014 11:25, "Ellis Kenyo" <spon...@...> wrote:
                          >
                          >
                          > Put cursor on first line
                          >
                          > qqj3>>jq
                          >
                          > Then replay with n@q where n is a number
                          >
                          > On 10 Jun 2014 11:24, "Ni Va" <niva...@...> wrote:
                          >
                          >
                          > On Tuesday, June 10, 2014 12:11:10 PM UTC+2, elken wrote:
                          >
                          > > Put j3>>3j in a buffer
                          >
                          > >
                          >
                          > > On 10 Jun 2014 08:40, "Ni Va" <niva...@...> wrote:
                          >
                          > >
                          >
                          > > Hi,
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > > I got a file that contains those lines :
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > > \s\s\s\s\sFOO
                          >
                          > >
                          >
                          > > BAR1
                          >
                          > >
                          >
                          > > BAR2
                          >
                          > >
                          >
                          > > END_OF_BLOCK
                          >
                          > >
                          >
                          > > \s\s\s\s\sFOO2
                          >
                          > >
                          >
                          > > BAR1
                          >
                          > >
                          >
                          > > BAR2
                          >
                          > >
                          >
                          > > END_OF_BLOCK
                          >
                          > >
                          >
                          > > \s\s\s\s\sFOO3
                          >
                          > >
                          >
                          > > BAR1
                          >
                          > >
                          >
                          > > BAR2
                          >
                          > >
                          >
                          > > END_OF_BLOCK
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > > I would like to indent all sublines of each BLOCK to be like that :
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > > \s\s\s\s\sFOO
                          >
                          > >
                          >
                          > >              BAR1
                          >
                          > >
                          >
                          > >              BAR2
                          >
                          > >
                          >
                          > >              END_OF_BLOCK
                          >
                          > >
                          >
                          > > \s\s\s\s\sFOO2
                          >
                          > >
                          >
                          > >              BAR1
                          >
                          > >
                          >
                          > >              BAR2
                          >
                          > >
                          >
                          > >              END_OF_BLOCK
                          >
                          > >
                          >
                          > > \s\s\s\s\sFOO3
                          >
                          > >
                          >
                          > >              BAR1
                          >
                          > >
                          >
                          > >              BAR2
                          >
                          > >
                          >
                          > >              END_OF_BLOCK
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > > My file contains 500000 lines so it has to be done automatically
                          >
                          > >
                          >
                          > >
                          >
                          > >
                          >
                          > > --
                          >
                          > >
                          >
                          > > --
                          >
                          > >
                          >
                          > > 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+u...@....
                          >
                          > >
                          >
                          > > For more options, visit https://groups.google.com/d/optout.
                          >
                          >
                          >
                          > ???? don't understand the goal. tested without success
                          >
                          >
                          >
                          > --
                          >
                          > --
                          >
                          > 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+u...@....
                          >
                          > For more options, visit https://groups.google.com/d/optout.

                          --
                          --
                          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/d/optout.

                          --
                          --
                          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/d/optout.
                        • Tim Chase
                          ... The answers to the following questions would help: - when you type s are those the literal characters in the file, or are you using that as shorthand
                          Message 12 of 21 , Jun 10 3:42 AM
                          • 0 Attachment
                            On 2014-06-10 00:40, Ni Va wrote:
                            > \s\s\s\s\sFOO
                            > BAR1
                            > BAR2
                            > END_OF_BLOCK
                            > \s\s\s\s\sFOO2
                            > BAR1
                            > BAR2
                            > END_OF_BLOCK
                            > \s\s\s\s\sFOO3
                            > BAR1
                            > BAR2
                            > END_OF_BLOCK
                            >
                            > I would like to indent all sublines of each BLOCK to be like that :
                            >
                            > \s\s\s\s\sFOO
                            > BAR1
                            > BAR2
                            > END_OF_BLOCK
                            > \s\s\s\s\sFOO2
                            > BAR1
                            > BAR2
                            > END_OF_BLOCK
                            > \s\s\s\s\sFOO3
                            > BAR1
                            > BAR2
                            > END_OF_BLOCK

                            The answers to the following questions would help:

                            - when you type "\s" are those the literal characters in the file, or
                            are you using that as shorthand for "space" or "a space or a tab"?

                            - if the number of "\s"s (as defined by answering the previous
                            question) varies per line, should the indentation of the block that
                            follows correspond to the number of "\s"s?

                            - is the number of lines of data always three? (BAR1, BAR2,
                            END_OF_BLOCK) or does that vary too?

                            With those answers, it should be possible to craft an automated
                            solutions.

                            -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/d/optout.
                          • Ni Va
                            Sorry for my english Mr Chase : - when I type s these are the literal characters in the file - the number of s s varies on specific lines like this
                            Message 13 of 21 , Jun 10 4:33 AM
                            • 0 Attachment
                              Sorry for my english Mr Chase :

                              - when I type "\s" these are the literal characters in the file
                              - the number of "\s"s varies on specific lines like this example:
                              \s\s\sFOO1
                              \s\s\sBAR1
                              \s\s\sBAR2


                              \s\s\s\s\sFOO2
                              \s\s\sBAR1
                              \s\s\sBAR2

                              \s\s\s\s\s\s\sFOO3
                              \s\s\sBAR1
                              \s\s\sBAR2

                              - the number of lines of data is not always the same.

                              Thank you


                              On Tuesday, June 10, 2014 12:43:26 PM UTC+2, Tim Chase wrote:
                              > On 2014-06-10 00:40, Ni Va wrote:
                              >
                              > > \s\s\s\s\sFOO
                              >
                              > > BAR1
                              >
                              > > BAR2
                              >
                              > > END_OF_BLOCK
                              >
                              > > \s\s\s\s\sFOO2
                              >
                              > > BAR1
                              >
                              > > BAR2
                              >
                              > > END_OF_BLOCK
                              >
                              > > \s\s\s\s\sFOO3
                              >
                              > > BAR1
                              >
                              > > BAR2
                              >
                              > > END_OF_BLOCK
                              >
                              > >
                              >
                              > > I would like to indent all sublines of each BLOCK to be like that :
                              >
                              > >
                              >
                              > > \s\s\s\s\sFOO
                              >
                              > > BAR1
                              >
                              > > BAR2
                              >
                              > > END_OF_BLOCK
                              >
                              > > \s\s\s\s\sFOO2
                              >
                              > > BAR1
                              >
                              > > BAR2
                              >
                              > > END_OF_BLOCK
                              >
                              > > \s\s\s\s\sFOO3
                              >
                              > > BAR1
                              >
                              > > BAR2
                              >
                              > > END_OF_BLOCK
                              >
                              >
                              >
                              > The answers to the following questions would help:
                              >
                              >
                              >
                              > - when you type "\s" are those the literal characters in the file, or
                              >
                              > are you using that as shorthand for "space" or "a space or a tab"?
                              >
                              >
                              >
                              > - if the number of "\s"s (as defined by answering the previous
                              >
                              > question) varies per line, should the indentation of the block that
                              >
                              > follows correspond to the number of "\s"s?
                              >
                              >
                              >
                              > - is the number of lines of data always three? (BAR1, BAR2,
                              >
                              > END_OF_BLOCK) or does that vary too?
                              >
                              >
                              >
                              > With those answers, it should be possible to craft an automated
                              >
                              > solutions.
                              >
                              >
                              >
                              > -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/d/optout.
                            • Tim Chase
                              ... Not a problem, I just want to make sure that you get a solution that matches your needs ... I was trying to understand whether s s sTHREE BAR BAZ
                              Message 14 of 21 , Jun 10 4:47 AM
                              • 0 Attachment
                                On 2014-06-10 04:33, Ni Va wrote:
                                > Sorry for my english Mr Chase :

                                Not a problem, I just want to make sure that you get a solution that
                                matches your needs

                                > - the number of "\s"s varies on specific lines like this example:
                                > \s\s\sFOO1
                                > \s\s\sBAR1
                                > \s\s\sBAR2
                                >
                                > \s\s\s\s\sFOO2
                                > \s\s\sBAR1
                                > \s\s\sBAR2
                                >
                                > \s\s\s\s\s\s\sFOO3
                                > \s\s\sBAR1
                                > \s\s\sBAR2

                                I was trying to understand whether

                                \s\s\sTHREE
                                BAR
                                BAZ
                                END_OF_BLOCK
                                \s\sTWO
                                FRED
                                BARNEY
                                END_OF_BLOCK

                                becomes

                                \s\s\sTHREE
                                BAR
                                BAZ
                                END_OF_BLOCK
                                \s\sTWO
                                FRED
                                BARNEY
                                END_OF_BLOCK

                                where the indentation depends on the number of "\s" in the header
                                line, or whether all lines are indented the same.

                                -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/d/optout.
                              • Ni Va
                                the indentation depends on the number of s in the header. If you mean that the header is : s s sTHREE or s sTWO ... -- -- You received this message from
                                Message 15 of 21 , Jun 10 4:59 AM
                                • 0 Attachment
                                  the indentation depends on the number of "\s" in the header.
                                  If you mean that the header is :
                                  \s\s\sTHREE or \s\sTWO


                                  On Tuesday, June 10, 2014 1:48:53 PM UTC+2, Tim Chase wrote:
                                  > On 2014-06-10 04:33, Ni Va wrote:
                                  >
                                  > > Sorry for my english Mr Chase :
                                  >
                                  >
                                  >
                                  > Not a problem, I just want to make sure that you get a solution that
                                  >
                                  > matches your needs
                                  >
                                  >
                                  >
                                  > > - the number of "\s"s varies on specific lines like this example:
                                  >
                                  > > \s\s\sFOO1
                                  >
                                  > > \s\s\sBAR1
                                  >
                                  > > \s\s\sBAR2
                                  >
                                  > >
                                  >
                                  > > \s\s\s\s\sFOO2
                                  >
                                  > > \s\s\sBAR1
                                  >
                                  > > \s\s\sBAR2
                                  >
                                  > >
                                  >
                                  > > \s\s\s\s\s\s\sFOO3
                                  >
                                  > > \s\s\sBAR1
                                  >
                                  > > \s\s\sBAR2
                                  >
                                  >
                                  >
                                  > I was trying to understand whether
                                  >
                                  >
                                  >
                                  > \s\s\sTHREE
                                  >
                                  > BAR
                                  >
                                  > BAZ
                                  >
                                  > END_OF_BLOCK
                                  >
                                  > \s\sTWO
                                  >
                                  > FRED
                                  >
                                  > BARNEY
                                  >
                                  > END_OF_BLOCK
                                  >
                                  >
                                  >
                                  > becomes
                                  >
                                  >
                                  >
                                  > \s\s\sTHREE
                                  >
                                  > BAR
                                  >
                                  > BAZ
                                  >
                                  > END_OF_BLOCK
                                  >
                                  > \s\sTWO
                                  >
                                  > FRED
                                  >
                                  > BARNEY
                                  >
                                  > END_OF_BLOCK
                                  >
                                  >
                                  >
                                  > where the indentation depends on the number of "\s" in the header
                                  >
                                  > line, or whether all lines are indented the same.
                                  >
                                  >
                                  >
                                  > -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/d/optout.
                                • Tim Chase
                                  ... Okay, then the following one-liner should do what you describe ... that finds the number of s pairs in each s line, then indents the following block
                                  Message 16 of 21 , Jun 10 5:45 AM
                                  • 0 Attachment
                                    On 2014-06-10 04:59, Ni Va wrote:
                                    > the indentation depends on the number of "\s" in the header.
                                    > If you mean that the header is :
                                    > \s\s\sTHREE or \s\sTWO

                                    Okay, then the following one-liner should do what you describe

                                    :g/^\\s/exec 'sil! +,/^END_OF_BLOCK/'.repeat('>', strlen(matchstr(getline('.'), '\(\\s\)\+')) / 2)

                                    that finds the number of "\s" pairs in each "\s" line, then indents
                                    the following block (as ended by the "END_OF_BLOCK" line) by the
                                    that number of indentation levels. What this actually does
                                    (whether it uses tabs vs. spaces, and how many tabs/spaces those
                                    indentations are) will be controlled by your 'expandtab', 'tabstop'
                                    and 'shiftwidth' settings.

                                    The "sil!" just reduces the noise because the ">" Ex command likes to
                                    be noisy about its actions and you'll get thousands of "N lines >ed M
                                    times" messages otherwise.

                                    -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/d/optout.
                                  • Ni Va
                                    ... In fact I got : THE_LINE_OF_THE_HEADER_THREE OTHER DEPEND S LINES OTHER DEPEND S LINES -- -- You received this message from the vim_use
                                    Message 17 of 21 , Jun 10 6:05 AM
                                    • 0 Attachment
                                      On Tuesday, June 10, 2014 2:45:53 PM UTC+2, Tim Chase wrote:
                                      > On 2014-06-10 04:59, Ni Va wrote:
                                      >
                                      > > the indentation depends on the number of "\s" in the header.
                                      >
                                      > > If you mean that the header is :
                                      >
                                      > > \s\s\sTHREE or \s\sTWO
                                      >
                                      >
                                      >
                                      > Okay, then the following one-liner should do what you describe
                                      >
                                      >
                                      >
                                      > :g/^\\s/exec 'sil! +,/^END_OF_BLOCK/'.repeat('>', strlen(matchstr(getline('.'), '\(\\s\)\+')) / 2)
                                      >
                                      >
                                      >
                                      > that finds the number of "\s" pairs in each "\s" line, then indents
                                      >
                                      > the following block (as ended by the "END_OF_BLOCK" line) by the
                                      >
                                      > that number of indentation levels. What this actually does
                                      >
                                      > (whether it uses tabs vs. spaces, and how many tabs/spaces those
                                      >
                                      > indentations are) will be controlled by your 'expandtab', 'tabstop'
                                      >
                                      > and 'shiftwidth' settings.
                                      >
                                      >
                                      >
                                      > The "sil!" just reduces the noise because the ">" Ex command likes to
                                      >
                                      > be noisy about its actions and you'll get thousands of "N lines >ed M
                                      >
                                      > times" messages otherwise.
                                      >
                                      >
                                      >
                                      > -tim

                                      It works a little using \s out \\s because I have magic card I think:

                                      :g/^\s/exec 'sil! +,/^END_OF_BLOCK/'.repeat('>', strlen(matchstr(getline('.'), '\(\s\)\+')) / 2)


                                      In fact I got :

                                      <some\spaces>THE_LINE_OF_THE_HEADER_THREE
                                      OTHER DEPEND'S LINES
                                      OTHER DEPEND'S LINES

                                      --
                                      --
                                      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/d/optout.
                                    • Ben Fritz
                                      ... Next time, maybe don t misrepresent your problem. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
                                      Message 18 of 21 , Jun 10 7:13 AM
                                      • 0 Attachment
                                        On Tuesday, June 10, 2014 8:05:45 AM UTC-5, Ni Va wrote:
                                        >
                                        > It works a little using \s out \\s because I have magic card I think:
                                        >
                                        > :g/^\s/exec 'sil! +,/^END_OF_BLOCK/'.repeat('>', strlen(matchstr(getline('.'), '\(\s\)\+')) / 2)
                                        >
                                        >
                                        > In fact I got :
                                        >
                                        > <some\spaces>THE_LINE_OF_THE_HEADER_THREE
                                        > OTHER DEPEND'S LINES
                                        > OTHER DEPEND'S LINES

                                        You were SPECIFICALLY ASKED whether all your \s examples were two literal '\' and 's' characters, or whether they were spaces. You said:

                                        > when I type "\s" these are the literal characters in the file

                                        Next time, maybe don't misrepresent your problem.

                                        --
                                        --
                                        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/d/optout.
                                      • Ni Va
                                        Ok I will have to imprve my english ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are
                                        Message 19 of 21 , Jun 10 7:31 AM
                                        • 0 Attachment
                                          Ok I will have to imprve my english

                                          On Tuesday, June 10, 2014 4:13:12 PM UTC+2, Ben Fritz wrote:
                                          > On Tuesday, June 10, 2014 8:05:45 AM UTC-5, Ni Va wrote:
                                          > >
                                          > > It works a little using \s out \\s because I have magic card I think:
                                          > >
                                          > > :g/^\s/exec 'sil! +,/^END_OF_BLOCK/'.repeat('>', strlen(matchstr(getline('.'), '\(\s\)\+')) / 2)
                                          > >
                                          > >
                                          > > In fact I got :
                                          > >
                                          > > <some\spaces>THE_LINE_OF_THE_HEADER_THREE
                                          > > OTHER DEPEND'S LINES
                                          > > OTHER DEPEND'S LINES
                                          >
                                          > You were SPECIFICALLY ASKED whether all your \s examples were two literal '\' and 's' characters, or whether they were spaces. You said:
                                          >
                                          > > when I type "\s" these are the literal characters in the file
                                          >
                                          > Next time, maybe don't misrepresent your problem.

                                          --
                                          --
                                          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/d/optout.
                                        • Tim Chase
                                          ... Which would adjust the command, so you re remove the /2 because that divides by the number of characters found. With a literal s , that s two
                                          Message 20 of 21 , Jun 10 10:37 AM
                                          • 0 Attachment
                                            On 2014-06-10 07:13, Ben Fritz wrote:
                                            > > It works a little using \s out \\s because I have magic card I
                                            > > think:
                                            > >
                                            > > :g/^\s/exec 'sil! +,/^END_OF_BLOCK/'.repeat('>',
                                            > > strlen(matchstr(getline('.'), '\(\s\)\+')) / 2)
                                            > >
                                            > >
                                            > > In fact I got :
                                            > >
                                            > > <some\spaces>THE_LINE_OF_THE_HEADER_THREE
                                            > > OTHER DEPEND'S LINES
                                            > > OTHER DEPEND'S LINES
                                            >
                                            > You were SPECIFICALLY ASKED whether all your \s examples were two
                                            > literal '\' and 's' characters, or whether they were spaces. You
                                            > said:

                                            Which would adjust the command, so you're remove the "/2" because
                                            that divides by the number of characters found. With a literal "\s",
                                            that's two characters, so you need to divide the length by 2. If
                                            there's only one character as found by the regexp "\s", then it's
                                            effectively dividing by 1 which is a no-op.

                                            -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/d/optout.
                                          • Ni Va
                                            Ok thank you and sorry for my english. ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are
                                            Message 21 of 21 , Jun 12 10:25 AM
                                            • 0 Attachment
                                              Ok thank you and sorry for my english.
                                              On Tuesday, June 10, 2014 7:38:18 PM UTC+2, Tim Chase wrote:
                                              > On 2014-06-10 07:13, Ben Fritz wrote:
                                              >
                                              > > > It works a little using \s out \\s because I have magic card I
                                              >
                                              > > > think:
                                              >
                                              > > >
                                              >
                                              > > > :g/^\s/exec 'sil! +,/^END_OF_BLOCK/'.repeat('>',
                                              >
                                              > > > strlen(matchstr(getline('.'), '\(\s\)\+')) / 2)
                                              >
                                              > > >
                                              >
                                              > > >
                                              >
                                              > > > In fact I got :
                                              >
                                              > > >
                                              >
                                              > > > <some\spaces>THE_LINE_OF_THE_HEADER_THREE
                                              >
                                              > > > OTHER DEPEND'S LINES
                                              >
                                              > > > OTHER DEPEND'S LINES
                                              >
                                              > >
                                              >
                                              > > You were SPECIFICALLY ASKED whether all your \s examples were two
                                              >
                                              > > literal '\' and 's' characters, or whether they were spaces. You
                                              >
                                              > > said:
                                              >
                                              >
                                              >
                                              > Which would adjust the command, so you're remove the "/2" because
                                              >
                                              > that divides by the number of characters found. With a literal "\s",
                                              >
                                              > that's two characters, so you need to divide the length by 2. If
                                              >
                                              > there's only one character as found by the regexp "\s", then it's
                                              >
                                              > effectively dividing by 1 which is a no-op.
                                              >
                                              >
                                              >
                                              > -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/d/optout.
                                            Your message has been successfully submitted and would be delivered to recipients shortly.