When I paste lines, like the ones below, to Vim,
" OmniCppComplete
let OmniCpp_NamespaceSearch = 1
Vim automagically adds the " comment character to all lines. How do I get rid of this and have it paste as it is?
What I'm getting after the paste in Vim:
66 " OmniCppComplete
67 " let OmniCpp_NamespaceSearch = 1
Two main options:
"+p"means “use the following register”;+refers to the clipboard, andpfor put!Should you be using the middle click selection paste in Linux, use
*instead of+to refer to it.:set paste. Turn it off once you leave insert mode with:set nopaste.