Emacs on OS X El Cap is version 22. MacPorts version is 24.

$ sudo port install emacs

then

$ cd ~
$ emacs .bash_profile

paste in:
# Use the up-to-date MacPorts emacs
alias emacs='/opt/local/bin/emacs'
# For our chording coding friends
export EDITOR=/opt/local/bin/emacs

you’re done. Consider portsUpdate to keep it up-to-date daily.

Screen Shot 2016-08-11 at 1.29.46 PM

Screen Shot 2016-08-11 at 1.32.48 PM

Screen Shot 2016-08-11 at 1.29.06 PM

MacPorts current vim is 7.4 and the version shipping with El Capitan is 7.3.

So…

$ sudo port install vim

then

$ cd ~
$ vim .bash_profile

paste in:
# Use the up-to-date MacPorts vim
alias='/opt/local/bin/vim'
# Life is good, so is vi
export EDITOR=/opt/local/bin/vim

you’re done. Consider portsUpdate to keep it up-to-date daily.

Screen Shot 2016-08-11 at 12.56.11 PM

Screen Shot 2016-08-11 at 12.30.31 PM

Screen Shot 2016-08-11 at 12.29.50 PM