On 23/08/13 11:11, glts wrote:
On Fri, Aug 23, 2013 at 10:53 AM, Tony Mechelynck
<[email protected]> wrote:
On 23/08/13 10:36, glts wrote:

On Fri, Aug 23, 2013 at 10:35 AM, glts <[email protected]> wrote:

On Thu, Aug 22, 2013 at 1:27 PM, Bohr Shaw <[email protected]> wrote:

However, the document says the register "1 always hold the text deleted
by the delete operator with these movement commands:|%|, |(|, |)|, |`|, |/|,
|?|, |n|, |N|, |{| and |}|.


I cannot reproduce this on Vim 7.4.

Just to make sure we are all on the same page, this is what I did:

Start Vim with vim -Nu NONE.
On the opening bracket of "one (two) three", press d%.
Now all three registers " 1 - contain "(two)".

I tried a few of the other operators mentioned, they also work correctly.


:s/operators/motions/

I used an HTML file, and I pressed d% on an <a> tag shorter than a line.
Part of both <a> and </a> tags, and the intervening text, were deleted, but
:reg showed old stuff in register 1. Then I did the same thing on a <div>
spanning several lines, and in this case the deleted text appeared in
register 1 as listed by :reg.

As ZyX mentioned, matchit remaps %. Please use vim -Nu NONE to test.

Ah, right. With -Nu NONE, and testing on matched ( ) parentheses, the deleted text does appear in register 1. But not with -Nu NORC, since I have a $VIM/vimfiles/plugin/matchit.vim containing only the line

runtime macros/matchit.vim

So I think that the OP was also using matchit, in which case he would not be using the % movement "as defined in Vim" anymore than I did the first time.


I got the same results (no change in reg. 1) with v%d on an object shorter
than a line.

This is expected, the exception mentioned in the help does not apply to
operators in Visual mode. See :h "0.



Best regards,
Tony.
--
"Science... warns me to be careful how I adopt a view which jumps
 with my preconceptions, and to require stronger evidence for such
 belief than for one to which I was previously hostile.  My business
 is to teach my aspirations to conform themselves to fact, not to
 try and make facts harmonize with my aspirations."
                    [Thomas Huxley, 1960]

--
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui