Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all. Whenever I copy/paste from xterm to xterm into vim my text ends up pasting skewed. If it was supposed to be: Code: 1 2 3 4 it pastes ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    101

    vim paste skew


    Hi all. Whenever I copy/paste from xterm to xterm into vim my text ends up pasting skewed. If it was supposed to be:

    Code:
    1
    2
    3
    4
    it pastes like this:
    Code:
    1
         2
              3
                   4
    this is really bugging me, I have to edit in xedit to fix it.

    Thanks!
    --Erik

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    This is because you are pasting pre-formatted text into vi, which does its own in-line formatting (for instance, indenting).

    The best way to avoid this is to run ":set paste" before pasting, then ":set nopaste" afterwards. This will disable all formatting so that you can paste easily, then re-enable whatever you had had originally.

  3. #3
    Linux Newbie
    Join Date
    Oct 2006
    Posts
    101
    Thanks! Works great
    --Erik

  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
  •