The new feature triggers an event "ClipboardChanged" whenever the clipboard is changed (in any application). The Windows editor "NoteTab" implements this (as "pasteboard") and it is, at times, very handy.
The feature is activated by ":set clipboardwatch" or ":set cbw", and turned off by ":set noclipboardwatch" or ":set nocbw".
To my .vimrc, I've added
if has("clipboardwatch") au! ClipboardChanged * exec "normal \"*gp$" endifso that anything copied to the clipboard is pasted into the current buffer.
Notes--
- I have a downloadable zip file (1.1
MB) that
includes these files:
gvim.exe doc/autocmd.txt doc/eval.txt doc/map.txt doc/options.txt doc/tags doc/various.txt
If you unzip directly into your Vim folder, usually "C:\Program Files\Vim\vim70
", you should be good to go. Some zip programs may not honor the full path, so you would have to copy the txt files to the vim70\doc directory. (This gvim.exe was compiled with nmake -f Make_mvc.mak GUI=yes DEFINES=-DFEAT_CBWATCH using Visual C++ Express 2005) - The patch (13 KB) is relative to vim-7.0.220
These files are patched:
runtime/doc/autocmd.txt runtime/doc/eval.txt runtime/doc/map.txt runtime/doc/options.txt runtime/doc/tags runtime/doc/various.txt src/eval.c src/fileio.c src/gui_w32.c src/gui_w48.c src/option.c src/option.h src/os_mswin.c src/proto/gui_w32.pro src/proto/ui.pro src/ui.c src/vim.h