<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Feb 20, 2018 at 12:44 PM doug moen <<a href="mailto:doug@moens.org">doug@moens.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>I have autoindent turned on by default, but it gets in the way if I paste text from the clipboard.<br></div>So I got used to typing<br></div>   :se noai<br></div>to turn off autoindent, and<br></div>   :se ai<br></div>to turn it back on.</div></blockquote><div><br></div><div>I've used always used `:set paste` for this, if it is ever a problem. I'm on Vim 8+, and usually it "just works". I've never figured out why it sometimes works and sometimes doesn't. It seems[1] `:set paste` may prevent other unwanted completions as well (braces and friends for source code).</div><div><br></div><div>Now that I think about it, I wonder if it is the difference between using the terminal emulator's paste (type the clipboard into the terminal) vs. Vim's clipboard support ("*p).</div><div><br></div><div>[1] <a href="https://stackoverflow.com/questions/2514445/turning-off-auto-indent-when-pasting-text-into-vim">https://stackoverflow.com/questions/2514445/turning-off-auto-indent-when-pasting-text-into-vim</a></div></div></div>