I read How can I set the default editor as nano on my Mac? and tried setting my default editor in .bashrc, .bash_profile, and .zshrc (how do I tell which one I'm using)? After adding to each of these files, I restarted my iTerm2, but still picking up the old editor....
.bashrc
# export LDFLAGS="-L/usr/local/opt/llvm/lib"
# export CPPFLAGS="-I/usr/local/opt/llvm/include"
export LLVM_HOME=/usr/local/opt/llvm
export DYLD_LIBRARY_PATH=$LLVM_HOME/lib
PS1="$ "
. "$HOME/.cargo/env"
export EDITOR=code
export VISUAL="$EDITOR"
.bash_profile
[[ -f ~/.bashrc ]] && . ~/.bashrc
. "$HOME/.cargo/env"
export EDITOR=code
export VISUAL="$EDITOR"
.zshrc
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
source ~/.bash_profile
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PATH="/usr/local/opt/llvm/bin:$PATH"
export GOPATH="$HOME/go"
export PATH="$GOPATH/bin:$PATH"
# export PATH="~/.cargo/bin:$PATH"
Question
How do I specify to use code (VSCode cli tool) to open the VSCode editor, it is still opening SublimeText (which I may have configured somewhere a long time ago, I don't know where to look). How do I debug this?
Hoping to be able to click on these source code files in iTerm2 and have it open VSCode in my current context.
