11*yankring.txt* For Vim version 7.0.
22
3- Author: David Fishburn September 16 , 2011
4- Version: 12 .0
3+ Author: David Fishburn February 5 , 2011
4+ Version: 13 .0
55
66For instructions on installing this file, type
77 :help add-local-help | add-local-help | inside Vim.
@@ -36,7 +36,8 @@ Homepage: http://vim.sourceforge.net/script.php?script_id=1234
3636 5.14 YRMapsCreate......................: | YRMapsCreate |
3737 5.15 YRMapsDelete......................: | YRMapsDelete |
3838 5.16 YRSearch..........................: | YRSearch |
39- 5.17 YRRunAfterMaps....................: | yankring-custom-maps |
39+ 5.17 YRCheckClipboard..................: | YRCheckClipboard |
40+ 5.18 YRRunAfterMaps....................: | YRRunAfterMaps |
4041 6. Tutorial...............................: | yankring-tutorial |
4142 6.1 YRShow............................: | YRShow-example |
4243 6.2 YRReplace.........................: | YRReplace-example |
@@ -261,9 +262,26 @@ your |.vimrc|.
261262 want to use the same text later on. By default, the YankRing
262263 will detect when Vim regains focus and check if the clipboard
263264 has changed since it last checked. If so, it will add the contents
264- of the clipboard to the YankRing. To disable this feature
265+ of the clipboard to the YankRing. This is accomplished by the
266+ use of the FocusGained Vim event for the GUI Vim. For console
267+ Vims, the FocusGained event does not fire, so additional logic
268+ is added to deal with it. To disable this feature
265269 you can put the following in your | vimrc | >
266270 let g:yankring_clipboard_monitor = 0
271+ yankring_manual_clipboard_check
272+ < Default: 0
273+ If running in console mode, Vim's FocusGained event will not
274+ fire as we flip back and forth between windows. This normally
275+ instructs the YankRing to check for updates to the system
276+ clipboard. When this option is set, the YankRing will check
277+ the clipboard under many different circumstances:
278+ Adding a new entry to the YankRing
279+ Replacing a previous paste
280+ Showing the YankRing window
281+ If the YankRing is setup to check the clipboard and the
282+ GUI is not running, this option will be enabled by default.
283+ To disable this feature you can put the following in your | vimrc | >
284+ let g:yankring_manual_clipboard_check = 0
267285 yankring_paste_check_default_buffer
268286< Default: 1
269287 If the default register has changed without the YankRing registering
@@ -767,15 +785,32 @@ to use.
767785
7687865.13 YRReplace *YRReplace*
769787 The purpose of the YankRing is to gain access to previously yanked
770- (or deleted) elements. This command will replace the previously
771- paste with a different entry from the yankring.
788+ (or deleted) elements. This command will replace the previous
789+ paste with a different entry from the yankring.
772790 By default, I choose <C-P> (P for previous) to replace the last paste
773791 while moving backwards through the yankring. <C-N> (N for next)
774792 replaces the last paste while moving forward through the yankring.
775793
776794 Examples:
777795 See the | yankring-tutorial | for examples.
778796
797+ On the Windows platform, I use ALT-< and ALT-> to move back and
798+ forwards through the yankring instead of C-P and C-N. ALT-< is
799+ actually ALT-, since I do not press the Shift key to get the <.
800+
801+ To do this, I added the following to my .vimrc:
802+ " Do not map the default <C-N> and <C-P> keys
803+ " These two characters are the ALT-< and ALT->.
804+ " To determine what character # these are go into insert mode
805+ " in a new buffer. Press CTRL-V then ALT and the > key.
806+ " Leave insert mode, move the cursor onto the character
807+ " and press ga. This will display the decimal, hex and octal
808+ " representation of the character. In this case, they are
809+ " 172 and 174.
810+ if has('win32')
811+ let g:yankring_replace_n_pkey = '<Char-172> '
812+ let g:yankring_replace_n_nkey = '<Char-174> '
813+ endif
779814
7808155.14 YRMapsCreate *YRMapsCreate*
781816 This public function is responsible for creating the maps which
@@ -796,6 +831,16 @@ to use.
796831 prompt you to enter which match you wish pasted.
797832 See also | YRSearch-example | .
798833
834+ 5.17 YRCheckClipboard *YRCheckClipboard*
835+ Normally the GUI Vims will automatically (via autocmds)
836+ check for changes to the system clipboard and add any new
837+ changes to the YankRing. Most console Vim's do not fire
838+ the required autocmds. This command will perform the check
839+ manually.
840+
841+ 5.18 YRRunAfterMaps *YRRunAfterMaps*
842+ See the following section | yankring-custom-maps | .
843+
799844
800845==============================================================================
8018466. Tutorial *yankring-tutorial*
@@ -1170,13 +1215,55 @@ mapping: >
11701215==============================================================================
117112167. History *yankring-history*
11721217
1218+ 13.0: February 5, 2012
1219+ NF: [p, ]p, [P, ]P are now supported within the YankRing
1220+ window (Alexandre Provencio).
1221+ NF: When using the console version of Vim the yankring was not
1222+ detecting the "+ register automatically as the FocusGained
1223+ event does not fire in console mode. When new elements are
1224+ added or the YankRing is shown the clipboard will be
1225+ checked for new values (Giuseppe Rota).
1226+ NF: Added a new option, g:yankring_manual_clipboard_check which
1227+ when enabled will manually check for clipboard changes at
1228+ certain times within the YankRing. This option is not used
1229+ if the GUI is running as the FocusGained will perform checks
1230+ at appropriate times (Erik Westrup).
1231+ BF: With clipboard=unnamed replacing the previous paste with a
1232+ different value from the YankRing did not work in all cases
1233+ (Chris Lott).
1234+ BF: Under certain conditions the YankRing would still check
1235+ the system clipboard even if g:yankring_clipboard_monitor == 0.
1236+ This can lead to delays when attempting to access the
1237+ clipboard when running in console mode. Starting Vim with
1238+ the -X switch removes the delay (Erik Westrup).
1239+ BF: Incorrect syntax setting cpoptions (Thilo Six).
1240+
1241+ 12.0: October 15, 2011
1242+ NF: A console Vim does not necessarily react to a FocusGained event
1243+ which means as you switch Focus back and forth between a
1244+ console Vim, the YankRing's feature to automatically gather
1245+ changes to the system clipboard is not triggered. Now special
1246+ processing takes place in various spots when you are not running
1247+ Vim with a GUI, to check for changes to the clipboard. Those
1248+ already running a GUI Vim, are unaffected by this change
1249+ (Giuseppe Rota).
1250+ NF: New command, YRCheckClipboard, which allows you to force
1251+ the YankRing to check the system clipboard and if the
1252+ value is not present already in the YankRing, it will add it.
1253+ This is typically done automatically, but certain console
1254+ Vim's do not receive the necessary events for automation.
1255+ BF: Some additional changes were required for the "unnamedplus"
1256+ support.
1257+ BF: YRGetMultiple reported an error, though typically you would
1258+ use YRShow to paste the items.
1259+
11731260 12.0: September 16, 2011
11741261 NF: Added support for the clipboard option "unnamedplus" which was
11751262 added after 7.3 (Hong Xu).
11761263 NF: When displaying the YankRing using YRShow, a new command "R"
11771264 has been added to display all of Vim's registers [0-9a-z] .
11781265 BF: YRMapsDelete did not remove the normal mode @ map, which
1179- interfers with recorded macros (Philippe Vaucher ).
1266+ interfers with recorded macros (Philippe Vaucher).
11801267
11811268 11.0: August 09, 2010
11821269 NF: Documented the global variables to customize the location
0 commit comments