Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.80 KB | None | 0 0
  1. # Path to your oh-my-zsh installation.
  2. export ZSH=/Users/alex/.oh-my-zsh
  3.  
  4. # Set name of the theme to load.
  5. # Look in ~/.oh-my-zsh/themes/
  6. # Optionally, if you set this to "random", it'll load a random theme each
  7. # time that oh-my-zsh is loaded.
  8. #ZSH_THEME="robbyrussell"
  9. #ZSH_THEME=pygmalion
  10. ZSH_THEME="agnoster"
  11.  
  12. DEFAULT_USER="Alex"
  13.  
  14. # Uncomment the following line to use case-sensitive completion.
  15. # CASE_SENSITIVE="true"
  16.  
  17. # Uncomment the following line to use hyphen-insensitive completion. Case
  18. # sensitive completion must be off. _ and - will be interchangeable.
  19. # HYPHEN_INSENSITIVE="true"
  20.  
  21. # Uncomment the following line to disable bi-weekly auto-update checks.
  22. # DISABLE_AUTO_UPDATE="true"
  23.  
  24. # Uncomment the following line to change how often to auto-update (in days).
  25. # export UPDATE_ZSH_DAYS=13
  26.  
  27. # Uncomment the following line to disable colors in ls.
  28. # DISABLE_LS_COLORS="true"
  29.  
  30. # Uncomment the following line to disable auto-setting terminal title.
  31. # DISABLE_AUTO_TITLE="true"
  32.  
  33. # Uncomment the following line to enable command auto-correction.
  34. # ENABLE_CORRECTION="true"
  35.  
  36. # Uncomment the following line to display red dots whilst waiting for completion.
  37. # COMPLETION_WAITING_DOTS="true"
  38.  
  39. # Uncomment the following line if you want to disable marking untracked files
  40. # under VCS as dirty. This makes repository status check for large repositories
  41. # much, much faster.
  42. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  43.  
  44. # Uncomment the following line if you want to change the command execution time
  45. # stamp shown in the history command output.
  46. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  47. # HIST_STAMPS="mm/dd/yyyy"
  48.  
  49. # Would you like to use another custom folder than $ZSH/custom?
  50. # ZSH_CUSTOM=/path/to/new-custom-folder
  51.  
  52. # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
  53. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  54. # Example format: plugins=(rails git textmate ruby lighthouse)
  55. # Add wisely, as too many plugins slow down shell startup.
  56. #plugins=(git)
  57. plugins=(zsh-nvm git colored-man colorize github brew osx zsh-syntax-highlighting docker nvm npm node chucknorris)
  58.  
  59. # User configuration
  60.  
  61. export PATH="/usr/local:/usr/local:/usr/bin:/bin:/usr/sbin:/sbin"
  62. # export MANPATH="/usr/local/man:$MANPATH"
  63.  
  64. source $ZSH/oh-my-zsh.sh
  65.  
  66. # You may need to manually set your language environment
  67. # export LANG=en_US.UTF-8
  68.  
  69. #Preferred editor for local and remote sessions
  70. if [[ -n $SSH_CONNECTION ]]; then
  71. export EDITOR='vim'
  72. else
  73. export EDITOR='mvim'
  74. fi
  75.  
  76. # Compilation flags
  77. # export ARCHFLAGS="-arch x86_64"
  78.  
  79. # ssh
  80. # export SSH_KEY_PATH="~/.ssh/dsa_id"
  81.  
  82. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  83. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  84. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  85. # For a full list of active aliases, run `alias`.
  86. #
  87. # Example aliases
  88. # alias zshconfig="mate ~/.zshrc"
  89. # alias ohmyzsh="mate ~/.oh-my-zsh"
  90. export PATH="/usr/local/bin:$PATH"
  91.  
  92. alias ll="ls -la --color=auto"
  93.  
  94. fpath=(/usr/local/share/zsh-completions $fpath)
  95.  
  96. # unalias run-help
  97. autoload run-help
  98. HELPDIR=/usr/local/share/zsh/help
  99. #bindkey -e
  100. #
  101. #bindkey '[D' backward-word
  102. #bindkey '[C' forward-word
  103. #bindkey 'OD' backward-word
  104. #bindkey 'OC' forward-word
  105.  
  106. if [[ "$TERM" != emacs ]]; then
  107. [[ -z "$terminfo[kdch1]" ]] || bindkey -M emacs "$terminfo[kdch1]" delete-char
  108. [[ -z "$terminfo[khome]" ]] || bindkey -M emacs "$terminfo[khome]" beginning-of-line
  109. [[ -z "$terminfo[kend]" ]] || bindkey -M emacs "$terminfo[kend]" end-of-line
  110. [[ -z "$terminfo[kich1]" ]] || bindkey -M emacs "$terminfo[kich1]" overwrite-mode
  111. [[ -z "$terminfo[kdch1]" ]] || bindkey -M vicmd "$terminfo[kdch1]" vi-delete-char
  112. [[ -z "$terminfo[khome]" ]] || bindkey -M vicmd "$terminfo[khome]" vi-beginning-of-line
  113. [[ -z "$terminfo[kend]" ]] || bindkey -M vicmd "$terminfo[kend]" vi-end-of-line
  114. [[ -z "$terminfo[kich1]" ]] || bindkey -M vicmd "$terminfo[kich1]" overwrite-mode
  115.  
  116. [[ -z "$terminfo[cuu1]" ]] || bindkey -M viins "$terminfo[cuu1]" vi-up-line-or-history
  117. [[ -z "$terminfo[cuf1]" ]] || bindkey -M viins "$terminfo[cuf1]" vi-forward-char
  118. [[ -z "$terminfo[kcuu1]" ]] || bindkey -M viins "$terminfo[kcuu1]" vi-up-line-or-history
  119. [[ -z "$terminfo[kcud1]" ]] || bindkey -M viins "$terminfo[kcud1]" vi-down-line-or-history
  120. [[ -z "$terminfo[kcuf1]" ]] || bindkey -M viins "$terminfo[kcuf1]" vi-forward-char
  121. [[ -z "$terminfo[kcub1]" ]] || bindkey -M viins "$terminfo[kcub1]" vi-backward-char
  122.  
  123. # ncurses stuff
  124. [[ "$terminfo[kcuu1]" == "O"* ]] && bindkey -M viins "${terminfo[kcuu1]/O/[}" up-line-or-history
  125. [[ "$terminfo[kcud1]" == "O"* ]] && bindkey -M viins "${terminfo[kcud1]/O/[}" down-line-or-history
  126. [[ "$terminfo[kcuf1]" == "O"* ]] && bindkey -M viins "${terminfo[kcuf1]/O/[}" vi-forward-char
  127. [[ "$terminfo[kcub1]" == "O"* ]] && bindkey -M viins "${terminfo[kcub1]/O/[}" vi-backward-char
  128. [[ "$terminfo[khome]" == "O"* ]] && bindkey -M viins "${terminfo[khome]/O/[}" beginning-of-line
  129. [[ "$terminfo[kend]" == "O"* ]] && bindkey -M viins "${terminfo[kend]/O/[}" end-of-line
  130. [[ "$terminfo[khome]" == "O"* ]] && bindkey -M emacs "${terminfo[khome]/O/[}" beginning-of-line
  131. [[ "$terminfo[kend]" == "O"* ]] && bindkey -M emacs "${terminfo[kend]/O/[}" end-of-line
  132. fi
  133.  
  134. case "$TERM" in
  135. linux) # Linux console
  136. bindkey '\e[1~' beginning-of-line # Home
  137. bindkey '\e[4~' end-of-line # End
  138. bindkey '\e[3~' delete-char # Del
  139. bindkey '\e[2~' overwrite-mode # Insert
  140. ;;
  141. screen)
  142. bindkey '\e[1~' beginning-of-line # Home
  143. bindkey '\e[4~' end-of-line # End
  144. bindkey '\e[3~' delete-char # Del
  145. bindkey '\e[2~' overwrite-mode # Insert
  146. bindkey '\e[7~' beginning-of-line # Home
  147. bindkey '\e[8~' end-of-line # End
  148. bindkey '\eOc' forward-word # ctrl cursor right
  149. bindkey '\eOd' backward-word # ctrl cursor left
  150. bindkey '\e[3~' backward-delete-char # This should not be necessary!
  151. ;;
  152. rxvt)
  153. bindkey '\e[7~' beginning-of-line # Home
  154. bindkey '\e[8~' end-of-line # End
  155. bindkey '\eOc' forward-word # ctrl cursor right
  156. bindkey '\eOd' backward-word # ctrl cursor left
  157. bindkey '\e[3~' backward-delete-char # This should not be necessary!
  158. bindkey '\e[2~' overwrite-mode # Insert
  159. ;;
  160. xterm*)
  161. bindkey '\e[H' beginning-of-line # Home
  162. bindkey '\e[F' end-of-line # End
  163. bindkey '\e[3~' delete-char # Del
  164. bindkey '\e[2~' overwrite-mode # Insert
  165. bindkey "^[[5C" forward-word # ctrl cursor right
  166. bindkey "^[[5D" backward-word # ctrl cursor left
  167. bindkey "^[[1;5C" forward-word # ctrl cursor right
  168. bindkey "^[[1;5D" backward-word # ctrl cursor left
  169. ;;
  170. sun)
  171. bindkey '\e[214z' beginning-of-line # Home
  172. bindkey '\e[220z' end-of-line # End
  173. bindkey '^J' delete-char # Del
  174. bindkey '^H' backward-delete-char # Backspace
  175. bindkey '\e[247z' overwrite-mode # Insert
  176. ;;
  177. esac
  178.  
  179. _apex() {
  180. COMPREPLY=()
  181. local cur="${COMP_WORDS[COMP_CWORD]}"
  182. local opts="$(apex autocomplete -- ${COMP_WORDS[@]:1})"
  183. COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
  184. return 0
  185. }
  186.  
  187. #complete -F _apex apex
  188.  
  189. # place this after nvm initialization!
  190. autoload -U add-zsh-hook
  191. load-nvmrc() {
  192. if [[ -f .nvmrc && -r .nvmrc ]]; then
  193. nvm use
  194. elif [[ $(nvm version) != $(nvm version default) ]]; then
  195. echo "Reverting to nvm default version"
  196. nvm use default
  197. fi
  198. }
  199. add-zsh-hook chpwd load-nvmrc
  200. load-nvmrc
  201.  
  202. export ANDROID_HOME=~/Library/Android/sdk
  203. export PATH=${PATH}:${ANDROID_HOME}/tools
  204. export PATH=${PATH}:${ANDROID_HOME}/platform-tools
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement