Edit Page
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 11: | Line 11: | ||
|category2= |
|category2= |
||
}} |
}} |
||
− | This tip explains how to cycle between several registers, while accessing their content through the standard "unnamed" register (< |
+ | This tip explains how to cycle between several registers, while accessing their content through the standard "unnamed" register (<tt>@"</tt>). |
To easily swap between different registers it is convenient to map a key to move the registers in a "circular list". The following mapping illustrates the idea: |
To easily swap between different registers it is convenient to map a key to move the registers in a "circular list". The following mapping illustrates the idea: |
||
Line 18: | Line 18: | ||
</pre> |
</pre> |
||
− | Now you can cycle between the registers < |
+ | Now you can cycle between the registers <tt>""</tt>, <tt>"a</tt>, <tt>"b</tt> by pressing <tt>\s</tt> (assuming the default backslash for the leader key). |
− | *< |
+ | *<tt>:let @a=@b</tt> copies register <tt>"b</tt> to register <tt>"a</tt>. |
− | *< |
+ | *<tt>|</tt> separates Ex commands; <tt>\</tt> escapes the pipe for the map command. |
This is also useful if you want to copy between the xclipboard and the unnamed standard register of Vim: |
This is also useful if you want to copy between the xclipboard and the unnamed standard register of Vim: |