You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far I've very much been enjoying the Remote SSH extension, and have found it to be a huge productivity booster while working on remote servers...there's just one thing missing that would make it even better.
I discovered I can set my VISUAL variable to code -w so commands like crontab -e and visudo open the file being edited in an actual VSCode editor tab. This is extremely useful and I was pleasantly surprised when I tried it the first time and learned how well it works. However, it's a bit of a pain to have to manually set this every time I open the workspace. I can't put it in my .bash_profile because if I connect via another client, all of a sudden my editor doesn't work because it's trying to use code -w without being connected through VSCode.
I would like a way to specify, via VSCode settings, a list of remote commands to run after connecting to the remote host. This could be at the global, workspace, or "remote" level. This would allow me to put something like "remote.SSH.connectCommands": [ "export VISUAL=\"code -w\"" ] in my workspace settings and have it automatically set the variable only when connecting via VSCode. I couldn't find any other way of accomplishing this with the functionality included in "Remote: SSH" currently.
The text was updated successfully, but these errors were encountered:
I also would love to have this functionality.
Typical case is that on remote system with Lmod (or environmental modules) there are some modules needs to be loaded for particular workspace (for example to get environment for compiler etc), and it would be very nice to have option to configure commands to execute on connect, to automatically do it.
Thank you for this request! I see on #4474 others have requested something similar. I'm going to close this issue and track progress on this feature on #4474.
So far I've very much been enjoying the Remote SSH extension, and have found it to be a huge productivity booster while working on remote servers...there's just one thing missing that would make it even better.
I discovered I can set my
VISUAL
variable tocode -w
so commands likecrontab -e
andvisudo
open the file being edited in an actual VSCode editor tab. This is extremely useful and I was pleasantly surprised when I tried it the first time and learned how well it works. However, it's a bit of a pain to have to manually set this every time I open the workspace. I can't put it in my.bash_profile
because if I connect via another client, all of a sudden my editor doesn't work because it's trying to usecode -w
without being connected through VSCode.I would like a way to specify, via VSCode settings, a list of remote commands to run after connecting to the remote host. This could be at the global, workspace, or "remote" level. This would allow me to put something like
"remote.SSH.connectCommands": [ "export VISUAL=\"code -w\"" ]
in my workspace settings and have it automatically set the variable only when connecting via VSCode. I couldn't find any other way of accomplishing this with the functionality included in "Remote: SSH" currently.The text was updated successfully, but these errors were encountered: