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

function counterparts of motion commands

Expand Messages
  • Pankaj Gupta
    Hi, I want to launch vim so that the cursor is placed on the middle of the screen when open. I can use the -c option to supply functions. How can I find the
    Message 1 of 3 , Jun 10, 2014
    • 0 Attachment
      Hi,

      I want to launch vim so that the cursor is placed on the middle of the screen when open. I can use the -c option to supply functions. How can I find the function names for motion commands, e.g. M in this case? For switching windows I could find wincmd which is pretty handy. Does a similar function exist for motion commands?

      Thanks in Advance,
      Pankaj

      --
      --
      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.
    • John Little
      ... The plain answer is :normal, but that s so simple I m not sure I understand your request. Your example: vim -c normal M x.txt HTH, John Little -- -- You
      Message 2 of 3 , Jun 11, 2014
      • 0 Attachment
        On Wednesday, June 11, 2014 12:25:43 PM UTC+12, Pankaj Gupta wrote:

        > Does a similar function exist for motion commands?

        The plain answer is :normal, but that's so simple I'm not sure I understand your request.

        Your example:

        vim -c "normal M" x.txt

        HTH, 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/d/optout.
      • Pankaj Gupta
        Thanks this works for my current use case. Clearly my knowledge of normal is weak and needs brushing up. -- -- You received this message from the vim_use
        Message 3 of 3 , Jun 11, 2014
        • 0 Attachment
          Thanks this works for my current use case. Clearly my knowledge of normal is weak and needs brushing up.

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