Do you use a "wheel mouse"? I had a very similar problem in Emacs. It drove me crazy. Then I realized that when I used the wheel to scroll I occasionally got a middle button event which was bound to "paste". So, scattered through my file at seemingly random places would be stuff that I copied or deleted earlier. Does this sound like what is happening to you? gb