Skip to content

Commit db93838

Browse files
dfishburnvim-scripts
authored andcommitted
Version 7.0
NF: Added support for the / and ? motions so that y/search is supported (Vasilii Pascal). NF: When the YankRing window is displayed (or updated) an additional check is made against the default register. If it has changed since the YankRing recorded it, the value will be added to the history. NF: Added support for more motions h, j, k, l, H, M, L, ^, 0, -, +, _. And a pile of g motions g_, g^, gm, g$, gk, gj, gg, ge, gE. NF: The YankRing window will display a message it is operating in a limited mode if not using Vim 7.2 or the correct patch level. BF: Correction to some internal code which could lead to an endless loop (John Beckett). BF: Opening and closing the YankRing window with "set report=0" reported "1 line less" messages (Bill McCarthy). BF: Changed the default value of g:yankring_paste_check_default_buffer to check if the default paste buffer has changed when pressing 'p'. For example, if a plugin has changed the default registers it will be pasted rather than the top item from the YankRing. BF: YRMapsDelete did not remove all the maps created by the YankRing. BF: Under particular circumstances, yanking text with embedded @ characters were not properly stored and retrieved from the YankRing (Andrew Long). BF: Changed to use xmaps instead of vmaps so that the maps only work in visual mode and not select mode (David Liang).
1 parent ef2efb7 commit db93838

File tree

2 files changed

+173
-52
lines changed

2 files changed

+173
-52
lines changed

doc/yankring.txt

Lines changed: 56 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
*yankring.txt* For Vim version 7.0.
22

3-
Author: David Fishburn October 25, 2008
4-
Version: 6.0
3+
Author: David Fishburn November 14, 2008
4+
Version: 7.0
55

66
For instructions on installing this file, type
77
:help add-local-help |add-local-help| inside Vim.
@@ -252,6 +252,16 @@ your |.vimrc|.
252252
of the clipboard to the YankRing. To disable this feature
253253
you can put the following in your |vimrc| >
254254
let g:yankring_clipboard_monitor = 0
255+
yankring_paste_check_default_buffer
256+
< Default: 1
257+
If the default register has changed without the YankRing registering
258+
the change the YankRing will paste the top item from the history
259+
rather than what is currently in the default register.
260+
This option allows you to control the behaviour. Plugins can
261+
intentionally change the default buffer which the YankRing has
262+
no way to noticing. To disable this feature you can put the following
263+
in your |vimrc| >
264+
let g:yankring_paste_check_default_buffer = 0
255265
256266
<
257267
3.2 Default Keys *yankring-mappings*
@@ -298,10 +308,11 @@ variables in your |vimrc|.
298308
keys you wished mapped. >
299309
let g:yankring_o_keys = 'b B w W e E d y $ G ; iw iW aw aW'
300310
yankring_zap_keys
301-
< Default: 'f F t T'
311+
< Default: 'f F t T / ?'
302312
omaps are enough for most operations except for f and t.
303-
These motions prompt the user for the character they should
304-
act upon. These must be treated as a special case in YankRing. >
313+
These motions prompt the user for a character or string which
314+
they should act upon. These must be treated as a special case
315+
in YankRing. >
305316
let g:yankring_zap_keys = 'f t'
306317
yankring_ignore_operator
307318
< Default: 'g~ gu gU ! = gq g? > < zf g@'
@@ -376,13 +387,16 @@ variables in your |vimrc|.
376387
Leave insert mode, move the cursor onto the character
377388
and press ga. This will display the decimal, hex and octal
378389
representation of the character. In this case it is 172. >
379-
if has('win32')
380-
let g:yankring_replace_n_pkey = '<Char-172>'
381-
let g:yankring_replace_n_nkey = '<Char-174>'
382-
" Instead map these keys to moving through items in the quickfix window.
383-
nnoremap <C-P> :cp<cr>
384-
nnoremap <C-N> :cn<cr>
385-
endif
390+
if has('win32')
391+
let g:yankring_replace_n_pkey = '<Char-172>'
392+
let g:yankring_replace_n_nkey = '<Char-174>'
393+
" Instead map these keys to moving through items in the quickfix window.
394+
nnoremap <C-P> :cp<cr>
395+
nnoremap <C-N> :cn<cr>
396+
endif
397+
< Other users have also stated that this will work: >
398+
let g:yankring_replace_n_pkey = '<m-p>'
399+
let g:yankring_replace_n_nkey = '<m-n>'
386400
yankring_replace_n_nkey
387401
< n - normal mode
388402
Default: <C-N>
@@ -414,6 +428,9 @@ variables in your |vimrc|.
414428
nnoremap <C-P> :cp<cr>
415429
nnoremap <C-N> :cn<cr>
416430
endif
431+
< Other users have also stated that this will work: >
432+
let g:yankring_replace_n_pkey = '<m-p>'
433+
let g:yankring_replace_n_nkey = '<m-n>'
417434
418435
3.3 Customizing Maps *yankring-custom-maps*
419436

@@ -1107,6 +1124,33 @@ mapping: >
11071124
==============================================================================
11081125
7. History *yankring-history*
11091126

1127+
7.0: November 14, 2008:
1128+
NF: Added support for the / and ? motions so that y/search is
1129+
supported (Vasilii Pascal).
1130+
NF: When the YankRing window is displayed (or updated) an additional
1131+
check is made against the default register. If it has changed
1132+
since the YankRing recorded it, the value will be added to the
1133+
history.
1134+
NF: Added support for more motions h, j, k, l, H, M, L, ^, 0, -, +, _.
1135+
And a pile of g motions g_, g^, gm, g$, gk, gj, gg, ge, gE.
1136+
NF: The YankRing window will display a message it is operating
1137+
in a limited mode if not using Vim 7.2 or the correct patch
1138+
level.
1139+
BF: Correction to some internal code which could lead to an
1140+
endless loop (John Beckett).
1141+
BF: Opening and closing the YankRing window with "set report=0"
1142+
reported "1 line less" messages (Bill McCarthy).
1143+
BF: Changed the default value of g:yankring_paste_check_default_buffer
1144+
to check if the default paste buffer has changed when pressing
1145+
'p'. For example, if a plugin has changed the default registers
1146+
it will be pasted rather than the top item from the YankRing.
1147+
BF: YRMapsDelete did not remove all the maps created by the YankRing.
1148+
BF: Under particular circumstances, yanking text with embedded @
1149+
characters were not properly stored and retrieved from the
1150+
YankRing (Andrew Long).
1151+
BF: Changed to use xmaps instead of vmaps so that the maps only work
1152+
in visual mode and not select mode (David Liang).
1153+
11101154
6.1: October 31, 2008:
11111155
BF: If the g:yankring_history_dir contains spaces (default on
11121156
Windows) an error was reported. A simple work around was to

0 commit comments

Comments
 (0)