Oh-my-zshell config file

File name

.zshrc

File content

  1. plugins=(git vi-mode)
  2. source $ZSH/oh-my-zsh.sh
  3. # Preferred editor for local and remote sessions
  4. if [[ -n $SSH_CONNECTION ]]; then
  5. export EDITOR='vim'
  6. else
  7. export EDITOR='vim'
  8. fi
  9. # aliases
  10. alias npmr="npm run"
  11. # ctrl-r starts searching history backward
  12. bindkey '^r' history-incremental-search-backward
  13. bindkey '^P' up-history
  14. bindkey '^N' down-history
  15. export NVM_DIR="$HOME/.nvm"
  16. . "$(brew --prefix nvm)/nvm.sh"
  17. # open terminal in code directory
  18. cd /Users/jorge/Code
  19. export PATH="$PATH:$HOME/.yarn/bin"
  20. # to be able to run local npm packages as global
  21. # eg. `gulp` instead of `./node_modules/.bin/gulp`
  22. export PATH="$PATH:$HOME/.yarn/bin"

Then append npm completion to have autocomplete.

  1. npm completion >> ~/.zshrc