This behavior can be caused if certain settings are used for a few specific options.
- When 'clipboard' contains the
autoselect
setting, which it does by default under *nix (only applies for normal vim), your visual selection is stored to the *
register.
- When 'guioptions' contains the
a
setting, which it does by default under *nix (only applies for gvim), your visual selection is stored to the *
register.
The * register is synonymous with the clipboard in Windows and the currently selected text (as in select text, then middle-click to paste) in *nix.
'mouse' can also have an effect since if it is set to a
or contains both n
and v
then Vim will receive your mouse clicks and start a visual selection if you click & drag. The behavior of what happens with the contents of the visual selection is still handled by 'clipboard'
/'guioptions'
though.
Basically, if you're using *nix and the default settings for 'clipboard'
/'guioptions'
then "*
is going to be overwritten when you make a visual selection since that follows what other *nix applications do when you select text. If you're using Windows and the options are as described, then your clipboard is going to be overwritten since "*
and "+
both modify the clipboard on Windows.