ANN: YankRing 2.0 Beta1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ANN: YankRing 2.0 Beta1

David Fishburn


There was an initial problem with the first beta upload, people who have
already downloaded the beta, please download the newer version Beta1a.



 
YankRing.vim : Maintains a history of previous yanks and deletes
http://www.vim.org/scripts/script.php?script_id=1234

description
Vim already maintains a list of numbered registers containing the last 9
deletes.  These previous deletes can be referenced using [register]p, so "1p
will paste the last delete, "2p the 2nd last delete.  For more information
see |quote_number|.

Vim does not provide any mechanism to reference previous yanked text.  In
Emacs this feature is called the "kill ring".

The yankring plugin allows the user to configure the number of yanked and
deleted text.  After text has been pasted, it can be replaced with a
previous value from the yankring.


The major improvement for this release is the yankring window.

You can create a map to display a buffer displaying the yankring's contents:
    nnoremap <silent> <F11> :YRShow<CR>

YRShow creates a new split buffer (you can configure where it should be and
it's size)
        :YRShow  
            AutoClose=1;Cmds:<enter>,[g]p,[p]P,d,r,a,u,q,<space>;Help=?
            --- YankRing ---
            Elem  Content
            3     three^@
            2     two^@
            1     one^@
            5     five^@
            4     four^@
You can simply hit 'p', <enter>, double click on an item and it will be
pasted into your document.  The window will automatically close (by
default) after you have made a choice.  The element will be pasted into the
correct buffer if you have multiple split windows.

The new "GUI" supports all the usual Vim commands: p, P, gp, gP.
You can paste multiple items using visual mode.
You can also remove items from the yankring.


As usual, suggestions and bug reports are always welcome.
There was an initial problem with the first beta upload, people who have
already downloaded the beta, please download the newer version Beta1a.

Enjoy.
Dave