3 ms·
Interesting coincidence, I was pasting a production certificate into Vim the other day and it contained "kj", which escaped the editor and ate a few letters unt
by StavrosK 12y ago
Interesting coincidence, I was pasting a production certificate into Vim the other day and it contained "kj", which escaped the editor and ate a few letters until it reached an "i" and continued pasting.
It took production down for 30 minutes until I noticed it. Remember, kids! ":set paste".
- jnetterf 12y ago"+p will paste the system clipboard.
- StavrosK 12y agoNo way! I just tried it, it doesn't work :( That's too bad.
- SEMW 12y agoAre you on a mac and using the system default vim? If so, Apple cripples it to not be able to directly access the system clipboard -- use homebrew's vim or macvim instead.
- StavrosK 12y agoNo, I'm on Ubuntu, it just looks like this method doesn't work with terminal vim. Your sibling comment looks like it has a solution, though!
- irahul 12y agoI am not sure which version of vim you are on. I have been using clibpoard paste for a long time in Ubunut. Do a ":version" in vim and check if it's compiled with +clipboard. If it is, then it should work. Also, you can have this in your vimrc: set clipboard=unnamedplus And then your vim copy-paste will be in sync with system clipboard(no need for +p or +y).
- tybenz 12y agoThat's for GUI Vim. If you're using Terminal VIM you can install this plugin: https://github.com/kana/vim-fakeclip https://github.com/kana/vim-fakeclip
- nakkiel 12y agoNah. I've had terrible and inconsistent results with this. I literally hate this thing so much that I've stopped using it altogether. It's most likely due to me not figuring out exactly what's going on but I can't be helped at this point.
- deleted 12y ago[deleted]
- nakkiel 12y agoI usually use `paste` but I sometimes catch myself formatting just-pasted chunks of code. I'll watch out for this.
- irahul 12y ago> Remember, kids! ":set paste". Or get used to ctrl-[ which is easier to type than Esc, doesn't skip events(like ctrl-c), and doesn't interfere with anything.