Created
November 22, 2018 19:47
-
-
Save steventux/0f04c9d3314c0f7c8cf6eb9a2342f795 to your computer and use it in GitHub Desktop.
Quick script to set up vim and git prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 [email protected]: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