GCTAA Logo

Governor's Career & Technical Academy Arlington

Introduction to Computer Science


Using Git from within Vim

The following process will add the fugitive plugin to vim, making it possible to easily use git from within vim (note These instructions where kindly created by Marco Sirabella):

  1. Create an account for yourself on GitHub and add your ssh public key to it. I would recommend using the same username and email as you did on GitLab, so that your one global git configuration will work for both.
  2. Run the following command at the bash prompt from your home directory:
      $ mkdir -p .vim/pack/plugins/start
      $ cd .vim/pack/plugins/start
      $ git clone git@github.com:tpope/vim-fugitive.git 
      
  3. The fugitive plugin is now installed. Take a look at Fugitive - vim plugin for git to get an idea how to use it.

We will practice the new workflow together in class.