Force VIM to stop overwriting your default buffer when pasting
I use VIM all the time for development, one thing that always bugs me is when I yank a chunk of code into my default buffer, and then paste if over something else, VIM will take whatever was pasted over and overwrite my default buffer with it. So the next time I try to paste, it will paste the previously pasted over text instead of the original stuff I yanked. Stick the following line into your .vimrc file to fix this...
xnoremap P v:register=='"'?'pgvy':'p'
It remaps "P" to paste and then pull back into your default buffer the same stuff you pasted so it's there to paste again. Very handy for me.
BTW you can always check out my dotfiles for varios parts of my unix environment in my Github Unix Environment Repo
To: @mattccrampton
0
Other Posts
When exporting photos from a service like Flickr, perhaps after they've given notice that they're going to delete our photos if you don't subscribe to......
All Truthy and Falsy Javascript Values In Nodejs, every value has an associated boolean, true or false, value. For example, a null value has an......
Google Forcing Nest Cameras Visual Indicator Light To Be On Received the following email from Google today... Full email text... Recently, we shared our commitment......
Posting to Twitter with Python - Part Two: Posting Photos NOTE: This is part two of my posting to Twitter with Python tutorial. If you......
Doubleclick to open a file in VIM from OSX I use VIM for just about everything from note taking to coding to keeping track of......
Sign Into Gmail Without Signing Into Google Chrome Unfortunately, Google has made changes to Chrome since this blog post was posted which removed the options......