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

Khalid Baheyeldin kb at 2bits.com
Tue Feb 20 14:44:20 EST 2018


Before I discovered that deleting my .vimrc (and now adding a minimal one)
fixed the pasting issue, I used a shell workaround, like so:

:r !cat
pasted text goes here
and here
and here
Ctrl-D

That always allowed me to paste stuff without vim's autoindent messing it
up.

On Tue, Feb 20, 2018 at 2:39 PM, Adam Glauser <adamglauser at gmail.com> wrote:

> 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
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>
>


-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple, and
wrong." -- H.L. Mencken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20180220/38219e22/attachment.htm>


More information about the kwlug-disc mailing list