Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using the following to edit the current command line in Sublime Text 2 (using a working subl alias)

.zshrc

set -o vi

EDITOR='subl'; export EDITOR

bindkey -M vicmd v edit-command-line 

This opens up sublime, but the window is blank. If I set the editor back to Vim, I am able to open a new vim buffer with the current command line in it. fc works just fine.

share|improve this question
Don't know what sublime is, but note that $EDITOR is meant to contain the path to an editor or more exactly an editor command, something that you can execp (to be used by anything needing to start an editor, not only fc) not a shell alias. – Stephane Chazelas May 8 at 21:02
EDITOR should be subl -w, not sure if that will help... And BTW, there's a sublimetext2 tag over at StackOverflow that might be of use next time you have a question - I know more users/plugin programmers monitor it there – MattDMo May 9 at 18:42
@MattDMo subl -w seems to have sorted it. Thanks Matt. If you want to post that as an answer I will accept it : ) – Nick Tomlin May 9 at 18:52

1 Answer

up vote 1 down vote accepted

According to the the OSX docs the EDITOR environment variable should be set to subl -w, which means "Wait for the files to be closed before returning." This behavior is undocumented but similar in Linux, where subl is generally a symlink to the sublime_text executable file, wherever you decide to install it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.