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

Aligning slowing down (:1,$Align |)

Expand Messages
  • Philip Rhoades
    People, I have been using this plugin for some time now and it has been exactly what I wanted. One thing I use it for is to align text that has been pasted
    Message 1 of 5 , Mar 13, 2013
    • 0 Attachment
      People,

      I have been using this plugin for some time now and it has been exactly
      what I wanted. One thing I use it for is to align text that has been
      pasted into a file from online bank payments (I have been burnt in the
      past by relying on the banks records and not having my own) but I have
      noticed that as my receipts text file gets larger, the align command
      starts slowing down dramatically and I think it might be hanging now - I
      have to kill the process, reopen the file, recover the file in Vim - and
      mostly it has seemed OK. The text file is now 2103 lines - I am
      expecting too much of this plugin?

      Thanks,

      Phil.
      --
      Philip Rhoades

      GPO Box 3411
      Sydney NSW 2001
      Australia
      E-mail: phil@...

      --
      --
      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.
    • tooth pik
      ... why align the whole file every time? why not align only the freshly pasted receipts? -- -- You received this message from the vim_use maillist. Do not
      Message 2 of 5 , Mar 13, 2013
      • 0 Attachment
        On Thu, Mar 14, 2013 at 01:48:05PM +1100, Philip Rhoades wrote:
        > People,

        > I have been using this plugin for some time now and it has been
        > exactly what I wanted. One thing I use it for is to align text that
        > has been pasted into a file from online bank payments (I have been
        > burnt in the past by relying on the banks records and not having my
        > own) but I have noticed that as my receipts text file gets larger,
        > the align command starts slowing down dramatically and I think it
        > might be hanging now - I have to kill the process, reopen the file,
        > recover the file in Vim - and mostly it has seemed OK. The text
        > file is now 2103 lines - I am expecting too much of this plugin?

        why align the whole file every time? why not align only the freshly
        pasted receipts?

        --
        --
        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.
      • Charles E Campbell
        ... * See if using let g:Align_xstrlen= 0 speeds things up a bit (:help align-option). Don t use this setting if you re using multibyte characters,
        Message 3 of 5 , Mar 14, 2013
        • 0 Attachment
          tooth pik wrote:
          > On Thu, Mar 14, 2013 at 01:48:05PM +1100, Philip Rhoades wrote:
          >> People,
          >> I have been using this plugin for some time now and it has been
          >> exactly what I wanted. One thing I use it for is to align text that
          >> has been pasted into a file from online bank payments (I have been
          >> burnt in the past by relying on the banks records and not having my
          >> own) but I have noticed that as my receipts text file gets larger,
          >> the align command starts slowing down dramatically and I think it
          >> might be hanging now - I have to kill the process, reopen the file,
          >> recover the file in Vim - and mostly it has seemed OK. The text
          >> file is now 2103 lines - I am expecting too much of this plugin?
          > why align the whole file every time? why not align only the freshly
          > pasted receipts?
          >
          * See if using let g:Align_xstrlen= 0 speeds things up a bit (:help
          align-option). Don't use this setting if you're using multibyte
          characters, though -- it won't align properly then.
          * Set up a dummy line and align using it and new stuff. As an example,
          let's assume that you're using |s as field delimiters:

          |one|two|three|four
          |four|three|two|one

          After aligning these, one gets (use a monospace font to see this properly)

          |one |two |three|four
          |four|three|two |one

          Then take the last line and convert it into a "dummy" line:

          Yp:s/[^|]/\~/g
          yielding
          |~~~~|~~~~~|~~~~~|~~~

          Aligning your new entries with the dummy line should speed things up a
          lot. You could wrap that process into a custom mapping, too (and have
          it generate the dummy line, align, remove the dummy line).

          Regards,
          C Campbell


          --
          --
          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.
        • Philip Rhoades
          ... Because the comments in the first column vary in length and the longest one might be halfway through the file - but see the next response for a fix that
          Message 4 of 5 , Mar 18, 2013
          • 0 Attachment
            On Thursday, 14 March 2013 14:33:12 UTC+11, toothpik wrote:
            > On Thu, Mar 14, 2013 at 01:48:05PM +1100, Philip Rhoades wrote:
            >
            > > People,
            >
            >
            >
            > > I have been using this plugin for some time now and it has been
            >
            > > exactly what I wanted. One thing I use it for is to align text that
            >
            > > has been pasted into a file from online bank payments (I have been
            >
            > > burnt in the past by relying on the banks records and not having my
            >
            > > own) but I have noticed that as my receipts text file gets larger,
            >
            > > the align command starts slowing down dramatically and I think it
            >
            > > might be hanging now - I have to kill the process, reopen the file,
            >
            > > recover the file in Vim - and mostly it has seemed OK. The text
            >
            > > file is now 2103 lines - I am expecting too much of this plugin?
            >
            >
            >
            > why align the whole file every time? why not align only the freshly
            >
            > pasted receipts?



            Because the comments in the first column vary in length and the longest one might be halfway through the file - but see the next response for a fix that should work for a while.

            Thanks,

            Phil.

            --
            --
            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.
          • Philip Rhoades
            DrChip, ... Yes! A dummy line is the answer - if I create that line at the top of the file (I add new receipts at the top) then I would only need to do the
            Message 5 of 5 , Mar 18, 2013
            • 0 Attachment
              DrChip,


              On Friday, 15 March 2013 01:59:25 UTC+11, DrChip wrote:
              > tooth pik wrote:
              >
              > > On Thu, Mar 14, 2013 at 01:48:05PM +1100, Philip Rhoades wrote:
              >
              > >> People,
              >
              > >> I have been using this plugin for some time now and it has been
              >
              > >> exactly what I wanted. One thing I use it for is to align text that
              >
              > >> has been pasted into a file from online bank payments (I have been
              >
              > >> burnt in the past by relying on the banks records and not having my
              >
              > >> own) but I have noticed that as my receipts text file gets larger,
              >
              > >> the align command starts slowing down dramatically and I think it
              >
              > >> might be hanging now - I have to kill the process, reopen the file,
              >
              > >> recover the file in Vim - and mostly it has seemed OK. The text
              >
              > >> file is now 2103 lines - I am expecting too much of this plugin?
              >
              > > why align the whole file every time? why not align only the freshly
              >
              > > pasted receipts?
              >
              > >
              >
              > * See if using let g:Align_xstrlen= 0 speeds things up a bit (:help
              >
              > align-option). Don't use this setting if you're using multibyte
              >
              > characters, though -- it won't align properly then.
              >
              > * Set up a dummy line and align using it and new stuff. As an example,
              >
              > let's assume that you're using |s as field delimiters:
              >
              >
              >
              > |one|two|three|four
              >
              > |four|three|two|one
              >
              >
              >
              > After aligning these, one gets (use a monospace font to see this properly)
              >
              >
              >
              > |one |two |three|four
              >
              > |four|three|two |one
              >
              >
              >
              > Then take the last line and convert it into a "dummy" line:
              >
              >
              >
              > Yp:s/[^|]/\~/g
              >
              > yielding
              >
              > |~~~~|~~~~~|~~~~~|~~~
              >
              >
              >
              > Aligning your new entries with the dummy line should speed things up a
              >
              > lot. You could wrap that process into a custom mapping, too (and have
              >
              > it generate the dummy line, align, remove the dummy line).



              Yes! A dummy line is the answer - if I create that line at the top of the file (I add new receipts at the top) then I would only need to do the whole file again if my comment line happens to be longer than the previous longest comment in the file (I probably should have thought of that I guess).

              Thanks!

              Phil.

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