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. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
