0

I'm running a local VM with Cloud-9 SDK installed. In my workspace I have a Mercurial repository, and I'd like to be able to use Cloud-9 editor for commit messages, and possibly also as a pipe for other commands like hg diff.

What I tried so far:

  • In TERMINAL settings I selected "Use Cloud9 as the Default Editor". If I try to hg commit, c9-editor doesn't open and the terminal get stalled until I press CTRL+C.
  • Same result if I set editor with export EDITOR="/usr/bin/c9 open --wait".
  • c9 somefile.txt works just fine from the same terminal, opening the file in the editor.
flod
  • 103
  • 5
  • I already followed the suggestions from this [other discussion](http://stackoverflow.com/questions/28028178/cloud-9-how-to-open-a-file-in-the-c9-editor-from-c9-terminal), but I believe this is a different issue. – flod Sep 26 '15 at 06:48

1 Answers1

0

Hg creates a file in tmp, and usually cloud9 is configured to allow editing only in home and workspace.

as a workaround you can use

export EDITOR='fn() {
    cat $1 > ~/.c9-edit;
    c9 open --wait ~/.c9-edit;
    cat ~/.c9-edit > $1;
} ;fn'
a user
  • 23,300
  • 6
  • 58
  • 90