Reputation: 49
I can't seem to change the default bash editor in OSX Lion terminal.
I've tried setting:
export EDITOR='<editor symlink with parameter>'
in both ~/.bashrc & ~/.bash_profile . The symlink is subl, and the parameter is -w. from the prompt it is:
subl -w
I have restarted terminal after each but every time I enter:
edit test-file.md
it opens TextWrangler (not the editor I've set). I've tried opening the symlink from the command line with no problem. I realize that I should probably just get used to typing the symlink, but the anal side of me wants to know why I can't set the default editor.
Any help with this trivial problem would be appreciated, thanks in advance!
Upvotes: 0
Views: 628
Reputation: 34527
I'm not even sure what edit command is. i don't have in on my Mac OS X Lion. Whatever it is, sounds like it ignores the EDITOR env variable and uses your MacOS X application settings. What you want can be accomplished with the alias shell command though:
alias edit=/path/to/vim
Upvotes: 1