Advertisement
truongngoclinh

my zshrc

Aug 26th, 2016
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.07 KB | None | 0 0
  1. # If you come from bash you might have to change your $PATH.
  2. #export PATH=$HOME/bin:/usr/local/bin:$PATH
  3.  
  4. # ******************** boiboi preferences **********************
  5. # local: change 'ngoclinh.truong' to 'Truong' on PATH
  6. export PATH=$PATH:/opt/local/bin:/opt/local/sbin
  7. export PATH=$PATH:/Users/ngoclinh.truong/android-sdks/platform-tools/
  8. export PATH=$PATH:/Users/ngoclinh.truong/Library/Android/sdk/platform-tools/
  9. export JAVA_OPTS="-XX:PermSize=256m -XX:MaxPermSize=512m"
  10. #fortune | cowsay | lolcat
  11.  
  12. # disable ctrl-D closes terminal: http://unix.stackexchange.com/questions/139115/disable-ctrl-d-window-close-in-terminator-terminal-emulator
  13. set -o ignoreeof
  14.  
  15. DEFAULT_USER='ngoclinh.truong'
  16.  
  17. plugins=(zsh-autosuggestions)
  18.  
  19. bindkey '^ ' autosuggest-accept
  20.  
  21. # git
  22. alias gcl='git clone'
  23. alias gst='git status'
  24. alias gb='git branch'
  25. alias gba='git branch -a'
  26. alias gl='git log --pretty=oneline'
  27. alias grl='git reflog'
  28. alias gc='git checkout'
  29. alias gcm='git checkout master'
  30. alias gcb='git checkout -b'
  31. alias gcca='git checkout -- .'
  32. alias gcc='git checkout --' # discard change
  33. alias gch='git reset HEAD' # unstage file
  34. alias gcld='git clean -df'
  35. alias gr='git rebase'
  36. alias grm='git rebase master'
  37. alias gri='git rebase -i'
  38. alias gra='git rebase --abort'
  39. alias grc='git rebase --continue'
  40. alias gcom='git commit -m'
  41. alias gcoa='git commit -a'
  42. alias gaa='git add .'
  43. alias ga='git add'
  44. alias gaj='git add \*.java'
  45. alias gax='git add \*.xml'
  46. alias gag='git add \*.gradle'
  47. alias gp='git push origin'
  48. alias gpf='git push --force origin'
  49. alias gpb='git push origin `git branch | grep \* | awk '{print $2}'` --tag -u'
  50. #alias gpfb='git push origin --force `git branch | grep \* | awk '{print $2}'` --tag -u'
  51. alias gpl='git pull'
  52. alias gplo='git pull origin master'
  53. alias gfo='git fetch origin master'
  54. alias gmo='git merge origin master'
  55. alias gf='git fetch'
  56. alias gm='git merge'
  57. alias gs='git stash'
  58. alias gsa='git stash apply'
  59. alias gsp='git stash pop'
  60. alias gsd='git stash drop'
  61. alias gsl='git stash list'
  62. alias grs='git reset --soft'
  63. alias grh='git reset --hard'
  64. alias grmix='git reset --mixed'
  65. alias grs1='git reset --soft HEAD~1'
  66. alias grh1='git reset --hard HEAD~1'
  67. alias grmix1='git reset --mixed HEAD~1'
  68. alias grv='git remote -v'
  69. alias grsurl='git remote set-url'
  70.  
  71. # commands
  72. alias lla='ls -la'
  73. alias lsa='ls -a'
  74. alias rmr='rm -r'
  75. alias download='cd ~/Downloads'
  76. alias desktop='cd ~/Desktop'
  77.  
  78. # application
  79. alias skype='sudo /Applications/Skype.app/Contents/MacOS/Skype' # bad, alway open new instance
  80. alias -s txt=vim
  81. alias -s rb=vim
  82. alias -s py=vim
  83. alias -s xml=vim
  84. alias -s json=vim
  85. alias -s java=vim
  86. alias -s JSON=vim
  87. alias -s gradle=vim
  88. alias -s md=vim
  89. alias -s h=vim
  90. alias -s m=vim
  91. alias -s c=vim
  92. alias -s cpp=vim
  93.  
  94. # specific location
  95. alias wsp='cd ~/WSP'
  96. alias gas2='cd ~/WSP/GAS2/gas-v2'
  97. alias gas1='cd ~/WSP/GAS1/garena-plus'
  98.  
  99. # config
  100. alias vi='nvim'
  101. alias vim='nvim'
  102. alias vimdiff='vim -d' # E.g. vimdiff file1.java file2.java
  103. alias vimconf='vi ~/.config/nvim/init.vim'
  104.  
  105. alias zconfig='vim ~/.zshrc'
  106. alias bconfig='vim ~/.bash_profile'
  107. alias zupdate='source ~/.zshrc'
  108. alias bupdate='source ~/.bash_profile'
  109. # ******************* end *********************
  110.  
  111. # Path to your oh-my-zsh installation.
  112. #export ZSH=/Users/ngoclinh.truong/.oh-my-zsh
  113. export ZSH=/Users/ngoclinh.truong/.oh-my-zsh
  114.  
  115. # Set name of the theme to load. Optionally, if you set this to "random"
  116. # it'll load a random theme each time that oh-my-zsh is loaded.
  117. # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
  118. ZSH_THEME="agnoster"
  119. # Uncomment the following line to use case-sensitive completion.
  120. # CASE_SENSITIVE="true"
  121.  
  122. # Uncomment the following line to use hyphen-insensitive completion. Case
  123. # sensitive completion must be off. _ and - will be interchangeable.
  124. # HYPHEN_INSENSITIVE="true"
  125.  
  126. # Uncomment the following line to disable bi-weekly auto-update checks.
  127. # DISABLE_AUTO_UPDATE="true"
  128.  
  129. # Uncomment the following line to change how often to auto-update (in days).
  130. # export UPDATE_ZSH_DAYS=13
  131.  
  132. # Uncomment the following line to disable colors in ls.
  133. # DISABLE_LS_COLORS="true"
  134.  
  135. # Uncomment the following line to disable auto-setting terminal title.
  136. # DISABLE_AUTO_TITLE="true"
  137.  
  138. # Uncomment the following line to enable command auto-correction.
  139. # ENABLE_CORRECTION="true"
  140.  
  141. # Uncomment the following line to display red dots whilst waiting for completion.
  142. # COMPLETION_WAITING_DOTS="true"
  143.  
  144. # Uncomment the following line if you want to disable marking untracked files
  145. # under VCS as dirty. This makes repository status check for large repositories
  146. # much, much faster.
  147. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  148.  
  149. # Uncomment the following line if you want to change the command execution time
  150. # stamp shown in the history command output.
  151. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  152. # HIST_STAMPS="mm/dd/yyyy"
  153.  
  154. # Would you like to use another custom folder than $ZSH/custom?
  155. # ZSH_CUSTOM=/path/to/new-custom-folder
  156.  
  157. # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
  158. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  159. # Example format: plugins=(rails git textmate ruby lighthouse)
  160. # Add wisely, as too many plugins slow down shell startup.
  161.  
  162. #source ~/.iterm2_shell_integration.`basename $SHELL`
  163. source $ZSH/oh-my-zsh.sh
  164.  
  165. # User configuration
  166.  
  167. # export MANPATH="/usr/local/man:$MANPATH"
  168.  
  169. # You may need to manually set your language environment
  170. # export LANG=en_US.UTF-8
  171.  
  172. # Preferred editor for local and remote sessions
  173. # if [[ -n $SSH_CONNECTION ]]; then
  174. #   export EDITOR='vim'
  175. # else
  176. #   export EDITOR='mvim'
  177. # fi
  178.  
  179. # Compilation flags
  180. # export ARCHFLAGS="-arch x86_64"
  181.  
  182. # ssh
  183. # export SSH_KEY_PATH="~/.ssh/dsa_id"
  184.  
  185. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  186. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  187. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  188. # For a full list of active aliases, run `alias`.
  189. #
  190. # Example aliases
  191. # alias zshconfig="mate ~/.zshrc"
  192. # alias ohmyzsh="mate ~/.oh-my-zsh"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement