Skip to content

Instantly share code, notes, and snippets.

@jshih
jshih / .vimrc
Created August 22, 2012 07:18
Enable Ctrl+c and Ctrl+v for copy and paste in gvim
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <ESC>"+pa
@jshih
jshih / .bash_profile
Created August 22, 2012 07:20
Show current git branch in terminal
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/'
}
export PS1='\[\033[0;32m\][\W]\[\033[00;36m\]$(parse_git_branch)\[\033[00m\]\$'