Sunday, March 11, 2007

Copying contents of vim register

Following command copies the contents of register q to copy register
:let @*=@q
Once copied, these contents can be used any where else, by simple paste.

One example use is to update a macro.
Following command updates register q
:let @q="Paste-copied-contents-Then-edit-as-required"
which then can be fired/executed by @q in command mode.

No comments:

Post a Comment