Skip to content

Instantly share code, notes, and snippets.

@alexanderlperez
Created June 28, 2015 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanderlperez/a59b15a5c46c9bbc228b to your computer and use it in GitHub Desktop.
Save alexanderlperez/a59b15a5c46c9bbc228b to your computer and use it in GitHub Desktop.
Getting copy/paste from system clipboard to work for ViM in OSX
Finally got copy/paste from system clipboard to work for ViM in OSX. 💪😭 This is confirmed to work on iterm2, supposedly it should work with Terminal.app too.
1) Upgrade vim to 7.4 with homebrew:
``` bash
brew install vim
```
2) Since --override-system-vi wasn't working for me, or brew link etc, backup and overwrite the new version to get 7.4 to load w/ a simple 'vim' in the command-line:
``` bash
sudo mv /usr/bin/vim /usr/bin/vim73 && sudo cp /usr/local/Cellar/vim/7.4.712/bin/vim /usr/local/bin
```
3) add `set clipboard=unnamed` to your `.vimrc`
Run vim and revel in how a simple yank and paste works swimmingly. Cheers!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment