I fixed the C-w issue by training myself to always close windows using it (for a while in the Gnome 2 days I was using a custom metacity theme with no title bars or buttons at all). The mode switching goes into your muscle memory and your body starts to recognize the difference between editor and GUI context.
I've lost the count of how many times I have closed a browser window while trying to cut text.