]> Vexing Labs - dotfiles.git/commitdiff
Update bash profile to show git branch at prompt.
authorAdam A.G. Shamblin <adam.shamblin@imulus.com>
Mon, 9 Jun 2014 16:21:25 +0000 (10:21 -0600)
committerAdam A.G. Shamblin <adam.shamblin@imulus.com>
Mon, 9 Jun 2014 16:21:25 +0000 (10:21 -0600)
dotbash_profile
dotvimrc

index 5cb46f1b825f45da940372d20a734d75eda2b6a1..43fa9cdba7407f43f8085b676cd5d44255202d30 100644 (file)
@@ -1,6 +1,9 @@
 export CLICOLOR=1
-export PATH=~/bin:/usr/local/bin:$PATH
 export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH"
+export GRADLE_HOME=$HOME/bin/gradle
+export ANDROID_PATH=/Applications/Android\ Studio.app/sdk/platform-tools:/Applications/Android\ Studio.app/sdk/tools
+export POSTGRES_PATH=/Applications/Postgres.app/Contents/Versions/9.3/bin
+export PATH=~/bin:/usr/local/bin:$PATH:$GRADLE_HOME/bin:$ANDROID_PATH:$POSTGRES_PATH
 
 YELLOW=$(tput setaf 136);
 ORANGE=$(tput setaf 166);
@@ -8,10 +11,19 @@ GREEN=$(tput setaf 64);
 BASE2=$(tput setaf 254);
 RESET=$(tput sgr0);
 
+if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
+    . /usr/local/git/contrib/completion/git-completion.bash
+fi
+
 # Change the prompt character when encountering git repositories
 function prompt_char {
-    git branch >/dev/null 2>/dev/null && echo '⤧ ' && return
-    echo '$'
+    if ! git rev-parse --git-dir > /dev/null 2>&1; then
+        echo '$'
+        return 0
+    fi
+
+    git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
+    echo "($git_branch) $"
 }
 
 # Automatically activate virtualenv when encountered,
@@ -28,7 +40,6 @@ function activate_env {
     unset HAS_DEACTIVATE
 }
 export PROMPT_COMMAND=activate_env
-
 export PS1='\[$ORANGE\]\u\[$RESET\] @ \[$YELLOW\]\h\[$RESET\] in \[$GREEN\]\w\[$RESET\]\n\[$BASE2\]$(prompt_char)\[$RESET\] '
 
 
index e8dc175c066be642f1b8f007fedc5280209d7894..a1d6824c97b4c6981ee32b5e1a5cb630ecb54fba 100644 (file)
--- a/dotvimrc
+++ b/dotvimrc
@@ -12,17 +12,21 @@ set softtabstop=4
 set tabstop=4
 set shiftwidth=4
 set noerrorbells
+set visualbell
 set vb
 set colorcolumn=80
 set hlsearch
 
+set mouse=a
+set ttymouse=xterm2
+
 filetype plugin indent on
 
 autocmd FileType make setlocal noexpandtab
 
 au BufNewFile,BufRead *.json set filetype=javascript
 au BufNewFile,BufRead /usr/local/nginx/conf/* set filetype=nginx
-au BufNewFile,BufRead *.md setlocal textwidth=80
+au BufNewFile,BufRead *.md,*.txt setlocal textwidth=80
 au BufWritePost *.py call Flake8()
 au BufWritePost *.js :JSHint