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

How to get the current paragraph as input range to function

Expand Messages
  • BPJ
    I have looked in vain in the documentation (i.e. probably not looked for the right keyword in the right places) to find a way to have a function use the
    Message 1 of 3 , Feb 25, 2013
    • 0 Attachment
      I have looked in vain in the documentation (i.e. probably not
      looked for the right keyword in the right places) to find a way to
      have a function use the current -- blank-line delimited --
      paragraph as its input range. Is there any way to do that other
      than first visually selecting the paragraph?

      /bpj

      --
      --
      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.
    • John Little
      ... Pass the position, then select the paragraph in the function, using the ip text object? See :help ip Regards, John Little -- -- You received this message
      Message 2 of 3 , Feb 25, 2013
      • 0 Attachment
        On Monday, February 25, 2013 10:56:21 PM UTC+13, BPJ wrote:
        > a way to
        > have a function use the current -- blank-line delimited --
        > paragraph as its input range. Is there any way to do that other
        > than first visually selecting the paragraph?

        Pass the position, then select the paragraph in the function, using the ip text object?

        See :help ip

        Regards, John Little

        --
        --
        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.
      • Ümit Kablan
        Hi, ... What about using { and } in the function explicitly? But then function will be paragraph oriented. I always prefer selecting something before
        Message 3 of 3 , Feb 25, 2013
        • 0 Attachment
          Hi,

          2013/2/25 John Little <John.B.Little@...>:
          > On Monday, February 25, 2013 10:56:21 PM UTC+13, BPJ wrote:
          >> a way to
          >> have a function use the current -- blank-line delimited --
          >> paragraph as its input range. Is there any way to do that other
          >> than first visually selecting the paragraph?
          >
          > Pass the position, then select the paragraph in the function, using the ip text object?
          >
          > See :help ip
          >

          What about using '{ and '} in the function explicitly? But then
          function will be paragraph oriented. I always prefer selecting
          something before applying anything on it.


          > Regards, John Little
          >
          > --
          > --
          > 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.
          >
          >

          --
          Ümit

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