Skip to content

Instantly share code, notes, and snippets.

@dergachev
Created January 8, 2014 19:09

Revisions

  1. dergachev created this gist Jan 8, 2014.
    25 changes: 25 additions & 0 deletions vim-clipboard-support.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    # Vim and clipboard support

    I generally prefer to use the terminal version of `vim`, rather than `macvim`. The major downside is no direct OSX clipboard integration. I tried running `brew install vim` but even that doesn't seem to compile with +clipboard support. I really wish `"+yy` and `+"p` would just work!

    Turns out that there's a great little plugin for that, [fakeclip](https://github.com/kana/vim-fakeclip)!

    There are different ways to install vim plugins into `~/.vim/`, but these days all the cool kids are using [vundle](https://github.com/gmarik/vundle). Here's how to install vundle, then use it to install fakeclip.

    ## Installing vundle

    ```bash
    git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

    tee -a ~/.vimrc <<'EOT'
    " enable vundle
    set rtp+=~/.vim/bundle/vundle/
    call vundle#rc()
    " vundle managed vim plugins; install these using ::BundleInstall
    Bundle 'gmarik/vundle'
    Bundle 'kana/vim-fakeclip'
    EOT

    vim +BundleInstall +qall
    ```