Skip to content

Instantly share code, notes, and snippets.

@steventux
Created November 22, 2018 19:47
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 steventux/0f04c9d3314c0f7c8cf6eb9a2342f795 to your computer and use it in GitHub Desktop.
Save steventux/0f04c9d3314c0f7c8cf6eb9a2342f795 to your computer and use it in GitHub Desktop.
Quick script to set up vim and git prompt
#!/bin/bash
# Save git-prompt script to home dir
echo "Fetching git prompt script"
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh > ~/.git-prompt.sh
echo "Adding git-prompt to bash"
# Source it and amend bash prompt
cat << 'END' >> ~/.bashrc
# Include git prompt
source ~/.git-prompt.sh
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
END
# Clone vimfiles repo
echo "Cloning steventux/vimfiles to ~/.vim/"
git clone git@github.com:steventux/vimfiles.git ~/.vim
ln -s ~/.vim/vimrc ~/.vimrc
echo "Initialising pathogen submodules"
cd ~/.vim/ && git submodule init && git submodule update
echo "Finished!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment