Skip to content

Instantly share code, notes, and snippets.

@sean-smith
Created September 17, 2015 15:57
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 sean-smith/51e1362f806a4e3376c9 to your computer and use it in GitHub Desktop.
Save sean-smith/51e1362f806a4e3376c9 to your computer and use it in GitHub Desktop.

#Setup Vim Gist Plugin

Ok, we're going to setup vim-gist via https://github.com/tpope/vim-pathogen. To install Pathogen:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Then add the following lines to your vimrc:

execute pathogen#infect()
syntax on
filetype plugin indent on

The Gist plugin needs https://github.com/mattn/webapi-vim:

cd ~/.vim/bundle && \
git clone https://github.com/mattn/webapi-vim.git

Then install the Gist plugin:

cd ~/.vim/bundle && \
git clone https://github.com/mattn/gist-vim

Then setup your github username like so:

git config --global github.user <username>

Then open up vim and run:

:Gist

It'll ask for your github password and if it works you'll see a line line the following:

Done: https://gist.github.com/89c930eeb6bd80571d57

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment