You're quite right,  though diw does the job

      * only for spaces and tabs, but does not trim, i.e. it leaves
the words glued together, e.g.,

        textbefore_____<cursor>______textafter   -->
textbeforetextafter

         which requires typing an aditional space

      * Does not trim vertical whitespace (newlines)

What i had in mind was approximately that

      * di_ is the same as diw + additional space, e.g.

        textbefore_____<cursor>______textafter   --> textbefore
textafter

      *while da_ trims also vertical whitespace (if present), e.g.,

        _______textbefore______
        ____\n
       ______ \n
        <cursor>
        ___\n
        ___\n
        _______textafter   --> textbefore textafter

If there is not vertical whitespace, da_ should double the
functionality of di_.




On Nov 23, 2:38 am, "Kana Natsuno" <[email protected]> wrote:
> On Mon, 23 Nov 2009 08:59:37 +0900, pepegnu <[email protected]> wrote:
> > Consider the following situation, you edit the text (underscore
> > represents whitespace):
>
> >        blah-blah-blah_____________________<cursor
> > here>___________________blah-blah-blah again
>
> > Now, it seems that '_' (underscore) is a free token in the context of
> > a text-object. If defined as a new text-object for whitespace, one
> > will be able to trim whitespace around the cursor in the example above
> > by issuing da_ (mnemonics: delete-a-blank),  or  ci_ (change-in-blank)
> > in normal mode to get
>
> >        blah-blah-blah blah-blah-blah again
>
> It seems to be somewhat useful, but:
>
> - What is the differences between a_ and i_?
>
> - Currently iw on spaces serves as your a_/i_.
>   Isn't it enough?  If not so, why?
>
> --
> To Vim, or not to Vim.http://whileimautomaton.net/
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui