This web page presents an experimental patch for a new feature for gvim on MS Windows. If you have any feedback, please contact me at kenhirsch at ftml dot net

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$"
  endif
so that anything copied to the clipboard is pasted into the current buffer.

Notes--