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

69173Re: Variable for "motion type" in Operator-pending mode

Expand Messages
  • Ingo Karkat
    Apr 19, 2013
    • 0 Attachment
      On 18-Apr-2013 16:16 +0200, glts wrote:

      > Hi,
      >
      > I have recently learnt of a patch that was submitted to the list almost
      > five years ago. Please see here:
      >
      > https://groups.google.com/d/msg/vim_dev/lR5rONDwgs8/iLsVCrxo_WsJ

      Oh dear, I remember that! It's frightening how quickly time passes :-)

      It's in the official todo list ($VIMRUNTIME/doc/todo.txt), though:
      ,----
      | Add v:motion_force. (Kana Natsuno, 2008 Dec 6)
      `----

      > The reception was positive but for some reason the discussion was
      > abandoned. I would like to reopen the discussion. I'd be very interested
      > in this feature and happy if the patch could eventually be included.
      >
      > As for the name of the variable, how about:
      >
      > v:motiontype
      >
      > The documentation says that when no motion type is given the variable
      > will be empty, when an explicit motion type is given ("forced") it will
      > be "v", "V", or "<C-V>". I don't think the word "force" is strictly
      > required to make the intent of the variable clear.

      With v:motiontype, I'd expect that to be applicable to _every_ motion,
      not just those few special ones. I would prefer v:forcedmotiontype. The
      only saving grace for this unreadable monster is that it's probably not
      going to be used very much.

      > As for the underscore, the majority of v: variables with compound names
      > don't have it and I think this short name would look nice next to the
      > other variables which are relevant in this context:
      >
      > v:register v:count v:count1 v:prevcount v:operator v:motiontype

      Yes, consistency is good.

      > What do you think?

      I'm missing a bit where such a variable would be useful or even
      necessary. A compelling example could avoid that we have to wait another
      five years for inclusion :-)

      -- regards, ingo

      --
      --
      You received this message from the "vim_dev" 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_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 6 messages in this topic