Find the answer to your Linux question:
Results 1 to 3 of 3
Sorry for this rather dumb question, but i have just returned to vi editing after two years out of software. I have just installed mandrake 10.1 (loving it). Anyway, i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2005
    Location
    Cambridge, UK
    Posts
    7

    Pasting into vi and can't turn aouto indent off! Aghh!


    Sorry for this rather dumb question, but i have just returned to vi editing after two years out of software. I have just installed mandrake 10.1 (loving it).

    Anyway, i select a nice bit of code off a forum and paste it into my vi window - every line gets shifted along. Fine i think - i should have expected that - so i type :set noai
    to stop the autoindent.

    This doesnt work! It still gets shifted along every line!

    Does anyone have any ideas ?

    Thanks in advance

    Ringo

  2. #2
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    Hi.

    Do ":set paste" before pasting and ":set nopaste" afterwards. This should help.
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

  3. #3
    Just Joined!
    Join Date
    Oct 2005
    Location
    Cambridge, UK
    Posts
    7
    yep - that did the trick.

    Thanks very much!

    I will remember that!

    Thanks again

    Ringo

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •