I found that every time I edit the ~/.zshrc (or ~/.bashrc , for bash users), the next thing I always do is the source. So I made an alias:
export EDITOR='/usr/bin/vim' alias zshrc='$EDITOR ~/.zshrc && source ~/.zshrc'
Similarly, I added
alias vimrc='$EDITOR ~/.vimrc'
In addition, the suffix alias is very important for zsh users, for example:
alias -s py=$EDITOR alias -s rb=$EDITOR
so when you type test.py or foo.rb it will expand to $EDITOR test.py or $EDITOR foo.rb
source share