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

making a : motion inclusive

Expand Messages
  • Benji Fisher
    Vim-Dev: I am trying to :omap % so that it acts like an inclusive motion. If the motion is forward in the text, I can move the cursor ahead one character, or
    Message 1 of 2 , Nov 1, 2001
      Vim-Dev:

      I am trying to :omap % so that it acts like an inclusive motion. If the
      motion is forward in the text, I can move the cursor ahead one character, or
      to the start of the next line, unless I happen to be on the last character of
      the file. What can I do if the motion is backwards? I want "d%" to delete
      "(all of this)". but if I start on the closing ")" then it leaves ")".

      Wishlist: :omap <inclusive> % ...

      --Benji Fisher
    • Benji Fisher
      ... Maybe this is a better suggestion for the wish list. We can force an operator to be characterwise, linewise, or blockwise with v, V, or in
      Message 2 of 2 , Nov 2, 2001
        Benji Fisher wrote:
        >
        > Vim-Dev:
        >
        > I am trying to :omap % so that it acts like an inclusive motion. If the
        > motion is forward in the text, I can move the cursor ahead one character, or
        > to the start of the next line, unless I happen to be on the last character of
        > the file. What can I do if the motion is backwards? I want "d%" to delete
        > "(all of this)". but if I start on the closing ")" then it leaves ")".
        >
        > Wishlist: :omap <inclusive> % ...

        Maybe this is a better suggestion for the wish list. We can force an
        operator to be characterwise, linewise, or blockwise with v, V, or <C-V> in
        Operator-pending mode. How about adding to the list: x for exclusive, and X
        for inclusive? (Mnemonic: "x" for "x-clusive" and "X" for "not x".) Then I
        could

        :omap % X:call Fun()<CR>

        --Benji Fisher
      Your message has been successfully submitted and would be delivered to recipients shortly.