12

When I paste items into Vim, the first several characters are routinely missing. This has caused some serious errors. If I paste into gedit, for example, all lines are there. I can go back into Vim after a successful paste in gedit, with the same clipboard contents, and characters get deleted.

See the screenshot...vim starts at ta, whereas the gedit starts well before that. What is going on precisely with Vim???

to paste I've tried ctrl+V, ctrl+shift+insert, (COMMAND MODE) p and P.truncates clipboard

1
  • 1
    Please copy and paste text next time
    – cutrightjm
    Commented Oct 1, 2016 at 6:43

1 Answer 1

29

That's because vim is in command mode when you start it. Before pasting your code, you need to go into insert mode, for example, pressing the i key.

In your example, you are pasting your code as vim commands and when it reaches the first a in $cryptData enters insertion mode after current character.

If you are starting with vim: http://vim.wikia.com/wiki/Tutorial

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .