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

Re: Basic calculation in Vim

Expand Messages
  • tjg
    @ChristianBrabandt : thank you for your answer, but I am limited (Android device) to Vim (VimTouch) only with no plugin (I suppose it is possible to install
    Message 1 of 17 , Aug 21, 2013
    • 0 Attachment
      @ChristianBrabandt : thank you for your answer, but I am limited (Android
      device) to Vim (VimTouch) only with no plugin (I suppose it is possible to
      install your plugin, but I freely admit I do not know how to do that.

      Thank you very much, anyway



      --
      View this message in context: http://vim.1045645.n5.nabble.com/Basic-text-statistics-calculation-in-Vim-tp5717021p5717045.html
      Sent from the Vim - General mailing list archive at Nabble.com.

      --
      --
      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.
    • Ben Fritz
      ... Now you omitted the to get the c register. Your insert-mode should be: = c.0/1500 insert a register = choose the expression
      Message 2 of 17 , Aug 21, 2013
      • 0 Attachment
        On Wednesday, August 21, 2013 4:17:47 AM UTC-5, tjg wrote:
        > @BenFritz : tried again, failed again (got the answer c : undefined
        >
        > variable). Here is what I did :
        >
        >
        >
        > a) (normal mode) : "cyiw (on 30310)
        >
        > b) (insert mode) : <C-R>=c.0/1500
        >
        >
        >
        > I am sure the problem is on my side, but where ?
        >

        Now you omitted the <C-R> to get the 'c' register.

        Your insert-mode should be:

        <C-R>=<C-R>c.0/1500<Enter>

        <C-R> insert a register
        = choose the "expression register" which drops you into a special mode to enter the expression to evaluate
        <C-R> insert a register in the special expression prompt mode
        c insert contents of register 'c'
        .0/1500 insert this text literally
        <Enter> evaluate the resulting expression and put it into the buffer where you are inserting

        <C-R>= is actually just a special case of <C-R> with a register. See :help @=, :help i_CTRL-R_=, :help registers.

        --
        --
        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.
      • tjg
        Thanks to your patience, I finally succeeded... And your explanations are very useful. Thank you very much. -- View this message in context:
        Message 3 of 17 , Aug 21, 2013
        • 0 Attachment
          Thanks to your patience, I finally succeeded... And your explanations are
          very useful.

          Thank you very much.



          --
          View this message in context: http://vim.1045645.n5.nabble.com/Basic-text-statistics-calculation-in-Vim-tp5717021p5717059.html
          Sent from the Vim - General mailing list archive at Nabble.com.

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