[kwlug-disc] Syntax and indenting in vim 8.0 driving me crazy ...

Adam Glauser adamglauser at gmail.com
Tue Feb 20 14:39:24 EST 2018


On Tue, Feb 20, 2018 at 12:44 PM doug moen <doug at moens.org> wrote:

> I have autoindent turned on by default, but it gets in the way if I paste
> text from the clipboard.
> So I got used to typing
>    :se noai
> to turn off autoindent, and
>    :se ai
> to turn it back on.
>

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).

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).

[1]
https://stackoverflow.com/questions/2514445/turning-off-auto-indent-when-pasting-text-into-vim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20180220/067f1819/attachment.htm>


More information about the kwlug-disc mailing list