Jonathan’s Blog

un blog pas comme les autres …

Debian vi disable autoindent when pasting

December 23rd, 2007 by eCliPs

Today i finally found how to stop vi to insert tab or comment my text when i paste something:
simply input the command
:set paste
then paste what you want to paste and
:set nopaste

Hoo and by the way, from now on, i will start posting only in english

Posted in linux

8 Responses

  1. mars

    Thanks for the tip. I was wondering how to do this for ages!

  2. C

    sweet! finally got annoyed with this today, and… answered. Thanks! :)

  3. .::ich-wars-nicht.ch::. » Einfügen in Vim

    [...] (Quelle: blog.exeko.com) [...]

  4. endre

    yeah,

    i was using :set !autoindent but your solution is far more better.

  5. Brett

    is this the same as :set noai
    ??

  6. Darren

    Great tip. I used :set noai before but that messed up after the first one line comment. This one rocks big time

  7. Berto at PricePlow

    This is great thanks!! Haha so funny how i used to just deal with it

  8. Paul Burney

    Awesome tip! This has been bugging me forever and you finally gave me the answer. It’s easy to remember, too!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.