Is there a way to open a file not from the workspace tree view but from the c9-terminal tab?
Background: c9 doesn´t allow me to set the workspace path to / for a use
Borrowing from here,
c9 open <filename>
You can do the next:
cd ~
ln -s / root
Then you can see the root link in the workspace. You can navigate through it and open any file (If you do not see the ~ folder in your favorites section, mark the 'Show Home in Favorites' option)
If you prefer, (once you've installed c9) you can open files from the terminal with:
c9 open ~/root/...
NOTE: You can open files but not save them if they require superuser permissions.
At the moment, the only way to open a file from the terminal is in vim or by using ls
and then clicking on the file you'd like to open.
Edit: You can now open from the terminal by running npm install -g c9
, restarting your workspace, then doing c9 file.ext
or c9 open file.ext
If you go to Preferences -> Settings -> Terminal, there is an option "Use Cloud9 as the Default Editor". If you enable this option and open a terminal, the EDITOR
env variable will look like this:
$ echo $EDITOR `which c9` open --wait
The path to c9 in my case is:
/mnt/shared/sbin/c9
For some reason, this didn't work for me initially, but now it works flawlessly. Perhaps the above default editor setting has to be enabled for it to work?
I've just written into /mnt/shared/plugins/google.cloud/etc/gitconfig
. First I was not allowed to write it, in nano. But using "c9 open" - just closing the tab with .gitconfig
saved my changes.
If you want to open any file from / the cloud 9 IDE must have permission. While configuring the C9 IDE give root as the user name and copy paste the public key in .ssh folder of root, allow root login in the ssh d config ,then you will be able to edit any file from the IDE.