Skip to content

Instantly share code, notes, and snippets.

@lfalvarez
Last active September 11, 2015 14:27
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 lfalvarez/5a8ed818a33cc42c5f0b to your computer and use it in GitHub Desktop.
Save lfalvarez/5a8ed818a33cc42c5f0b to your computer and use it in GitHub Desktop.
Environment configuration
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and function
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset=`tput sgr0`
c_user=`tput setaf 2; tput bold`
c_path=`tput setaf 4; tput bold`
c_git_clean=`tput setaf 2`
c_git_dirty=`tput setaf 1`
else
c_reset=
c_user=
c_path=
c_git_cleanclean=
c_git_dirty=
fi
git_prompt ()
{
if ! git rev-parse --git-dir > /dev/null 2>&1; then
return 0
fi
git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
if git diff --quiet 2>/dev/null >&2; then
git_color="${c_git_clean}"
else
git_color=${c_git_cleanit_dirty}
fi
echo " [$git_color$git_branch${c_reset}]"
}
PS1='${c_user}\u${c_reset}@${c_user}\h${c_reset}:${c_path}\W${c_reset}$(git_prompt)\$ '
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and function
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset=`tput sgr0`
c_user=`tput setaf 2; tput bold`
c_path=`tput setaf 4; tput bold`
c_git_clean=`tput setaf 2`
c_git_dirty=`tput setaf 1`
else
c_reset=
c_user=
c_path=
c_git_cleanclean=
c_git_dirty=
fi
git_prompt ()
{
if ! git rev-parse --git-dir > /dev/null 2>&1; then
return 0
fi
git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
if git diff --quiet 2>/dev/null >&2; then
git_color="${c_git_clean}"
else
git_color=${c_git_cleanit_dirty}
fi
echo " [$git_color$git_branch${c_reset}]"
}
PS1='${c_user}\u${c_reset}@${c_user}\h${c_reset}:${c_path}\W${c_reset}$(git_prompt)\$ '
(promises)falvarez@paro-taktsang:ddah-promises [version_0_3]$ cat ~/.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
" Pathogen load
filetype off
call pathogen#infect()
call pathogen#helptags()
filetype plugin indent on
syntax on
" Tabs
map <C-a> :tabn<CR>
" Pymode config
let g:pymode_lint_checkers = 'pyflakes'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment