clearing out an appended-to register

2006-11-09 Thread Lev Lvovsky
So I just discovered the wonders of being able to append to named  
registers - how though, do I then clear them out once I'm done with  
their contents?


thanks!
-lev


Re: clearing out an appended-to register

2006-11-09 Thread Charles E Campbell Jr

Lev Lvovsky wrote:

So I just discovered the wonders of being able to append to named  
registers - how though, do I then clear them out once I'm done with  
their contents?


Let's assume you're wishing to clear register A:

:let @a=

will empty it out.

Regards,
Chip Campbell



Re: clearing out an appended-to register

2006-11-09 Thread Tim Chase
So I just discovered the wonders of being able to append to named  
registers - how though, do I then clear them out once I'm done with  
their contents?



You can just overwrite to their lower-case equiv.

Thus, if you

ayy

to yank into register a and then move somewhere else and

Ayy

to yank-append into register a, you can just overwrite the 
contents by moving elsewhere and using


ayy

as usual.

If you absolutely *must* clear out the register, you can easily use

:let @a=''

It's helpful to understand that the uppercase and lowercase 
registers are exactly the same place of storage.  Uppercase just 
instructs Vim to append rather than overwrite any preexisting 
contents.


:help :let-register
:help quote_alpha
:help quote

-tim






Re: clearing out an appended-to register

2006-11-09 Thread Lev Lvovsky


On Nov 9, 2006, at 9:45 AM, Tim Chase wrote:



It's helpful to understand that the uppercase and lowercase  
registers are exactly the same place of storage.  Uppercase just  
instructs Vim to append rather than overwrite any preexisting  
contents.


:help :let-register
:help quote_alpha
:help quote


Ah, that helps a lot, I figured they'd be different.

thanks!
-lev