"this says, into the p register, (y)ank (a) double-quoted text object."

should have said "this says, into the p register, (y)ank (i)nside
double-quoted text object."

On Tue, Dec 2, 2008 at 1:51 PM, Chris Suter <[EMAIL PROTECTED]> wrote:

> you could also, from anywhere inside the double quotes, type "pyi" (that's
> double-quote, followed by 'p', 'y', 'i', and another double quote).
>
> this says, into the p register, (y)ank (a) double-quoted text object.
>
> this works for all sorts of things: you could get all the text in the tag
> (from after < to before >) by typing yi<
>
> see :help objects   for more on text objects -- there are about a million
> of them and they're a wonderful creation.
>
>
> On Tue, Dec 2, 2008 at 10:22 AM, Shade - <[EMAIL PROTECTED]> wrote:
>
>> Thanks a lot Charles and Agathoklis, both methods worked perfectly. I
>> forgot to enter the visual method to select a zone.
>>
>>
>> On Tue, Dec 2, 2008 at 4:01 PM, Agathoklis D. Hatzimanikas <
>> [EMAIL PROTECTED]> wrote:
>>
>>>
>>> On Tue, Dec 02, at 09:35 Charles Campbell wrote:
>>> >
>>> > Shade wrote:
>>> > > Hello everyone. I'm gonna paste an example of what i want to do.
>>> Let's
>>> > > imagine that I have this code:
>>> > >
>>> > > <p id="already_registered">
>>> > >
>>> > > And i wanna copy id="already_registered" in a register, for example
>>> > > the register "P". How can i do that, and how can i paste it back
>>> > > later?
>>> > >
>>> > I'm sure that there are a lot of ways.  Using normal mode (ie.
>>> manually):
>>> >
>>> > First method:
>>> >
>>> > put cursor on the "i" in "id=..." .  Press v.
>>> > move cursor to the end of what you want.
>>> > Press  "py
>>> >
>>> > Put cursor elsewhere, press
>>> >   "pp
>>> >
>>> > Second method:
>>> >
>>> > Again, put the cursor on the "i" in "id=...".  Press mp .
>>> > Move cursor to the end of what you want, plus one more.
>>> > Press:   "py`p
>>> >
>>> > Again, put cursor elsewhere, press
>>> >   "pp
>>> >
>>>
>>> Yet another one (while the cursor is on the "i" in "id=..."):
>>>
>>>    "pyt>
>>>
>>> It turned out that "t,T" and "f,F" are quite useful motions and I have to
>>> admit that I underestimated the usefulness of them when I first started
>>> to learn vim in 2006, but now I use them all the time.
>>>
>>> Regards,
>>> Ag.
>>>
>>>
>>>
>>
>> >>
>>
>
>
> --
> Christopher Suter
>



-- 
Christopher Suter

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to