Permalink
Browse files

add dotfiles

  • Loading branch information...
1 parent 1686729 commit a1395a0d0acc6d21fde0a0a75ff3c061b75229da Shintaro Abe committed Aug 24, 2012
Showing with 75 additions and 0 deletions.
  1. +41 −0 .bashrc
  2. +14 −0 .gitconfig
  3. +18 −0 .global_gitignore
  4. +2 −0 .profile
View
41 .bashrc
@@ -0,0 +1,41 @@
+export PATH=$HOME/bin:$PATH
+export PATH=/usr/local/bin:$PATH
+
+# Mac の設定
+if [ `uname` = "Darwin" ]; then
+ path=/Applications/MacVim.app/Contents/MacOS
+ if [ -d $path ]; then
+ export PATH=$path:$PATH
+ fi
+ alias vi='Vim'
+ alias vim='mvim'
+ alias jenkins='java -jar /usr/local/Cellar/jenkins/1.477/libexec/jenkins.war '
+fi
+
+alias ls='ls -Fv'
+alias la='ls -a'
+alias ll='la -l'
+alias vt='vim --remote-tab-silent'
+alias displaytype='ioreg -lw0 | grep IODisplayEDID | sed "/[^<]*</s///" | xxd-r | strings -6'
+alias diff='vim -d0'
+
+export EDITOR=vim
+export PAGER=vimpager
+
+# Git をプロンプトに表示する
+# http://henrik.nyh.se/2008/12/git-dirty-prompt
+# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
+# username@Machine ~/dev/dir[master]$ # clean working directory
+# username@Machine ~/dev/dir[master*]$ # dirty working directory
+
+function parse_git_dirty {
+ return [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]]
+}
+
+function parse_git_branch {
+ git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/"
+}
+
+branch=$(parse_git_branch)
+
+export PS1='\[\033[1;37m\][\u@\h:\w] - $(parse_git_branch)\n\t \$\[\033[0m\] '
View
@@ -0,0 +1,14 @@
+[user]
+ name = Shintaro Abe
+ email = dictav@mac.com
+[core]
+ editor = vim
+ pager = vimpager
+[color]
+ ui = auto
+[alias]
+ co = checkout
+ s = status
+ b = branch
+[merge]
+ tool = vimdiff
View
@@ -0,0 +1,18 @@
+#===============================================================================
+# OS X ignore
+.DS_Store
+Icon
+
+
+# Thumbnails
+._*
+
+# Files that might appear on external disk
+.Spotlight-V100
+
+#===============================================================================
+# Vim ignore
+.*.sw[a-z]
+*.un~
+Session.vim
+.netrwhist
View
@@ -0,0 +1,2 @@
+. ~/.bashrc
+

0 comments on commit a1395a0

Please sign in to comment.