remote-vscode
remote-vscode copied to clipboard
open several files at once
Hallo,
with remote atom it's posible to write into my remote bash something like
rmate file1.txt file2.txt
or even
rmate file*
and it opens multiple files at once.
I thought this doesn't work in VSCode because of the preview mode in vscode so I deactivated it through
"workbench.editor.enablePreview": false
in my user settings.
However it doesnt work. It still opens just one file in VSCode.
I would love to see above feature in remote vscode. Do you think this is something doable?
Thanks a lot!
Hi,
Yes, it is doable, I though is was already working, but it is not.
I will need to investigate that and implement the solution.
I see the same problem, happened just recently for me, no more than a week ago. Used to work great, and was able to open several files at once.
I didn't change anything in the extension in the last few weeks. Seems to be something else.
Regarding the investigation, I didn't have time to take a look on it yet.
Yep, I had an older version of Visual Studio Code 1.11.2, and am able to open multiple files, so works well. I'm guessing its broken for versions 1.51 and newer. Since rmate feature is more important to me, I'll just use that for now. Thanks.
A fix to opening multiple files (however not at once) is the "Keep Open" option which you can activate by right clicking the tab you want to "keep open" (or Ctrl + K Enter) and then run rmate on the following files you want open.
Edit: Any form of stabilizing the file in VSCode will "Keep Open" for example saving. If you're able to call on save for every file you open with rmate then its possible to open multiple files at once.
Is opening a folder support in plan ?
Any update on this? I really love this concept, but not being able to have more than 1 file open at a time really kills it's big benefit for me.
I found sshfs is very handy. It's better than remote-vscode, and it's more general in use.
My Solution/Workaround for this:
use the Command Palette Ctrl-Shift-P to open your settings file, just enter "Preferences: Open User Settings"!
Once you've opened your settings file (your settings file should be located on the right), add the "workbench.editor.enablePreview": false
Dear @romanmar . In the very first post when I described the problem I already included that solution. but I'm still unable to to
rmate file1.txt file2.txt
or even
rmate file*
which both was possible with remote-atom and rmate
You are welcome to contribute and help investigating the issue.
@bschnabel Oh I see, for me I had problems when I opened one file at time. Why won't you write a workaround, wrap rmate script and just call rmate for each file, it would work well. Here is what I have in my .bashrc Just dont open it in a directory that has 100's of files, or write a script to limit it to 10.
rmate() {
for var in "$@"
do
~/bin/rmate --host $SSH_RHOST -p 52698 -m "${HOSTNAME}@${var}" $var
done
}
that's a good idea. would this also work with something like rmate *.conf? By now I just sort of got used to open the files one bye one.
So I have similar style of a work around. I set "workbench.editor.enablePreview" to false and then I use small python script to open up the files I want.
import os
openList = ['meta.py', 'aemain.py', 'alphaEngine.py', 'enigma.py', 'epoch.py', 'phaseToDensity.py', 'plotFactory.py', 'printShop.py', 'os_sys_tools.py' ]
for py in openList:
cmd = 'rmate -p 19998 ' + py
os.system(cmd)
@rafaelmaiolla , any update on @ComfyDusts' PR to solve this? I'm an Atom user who's recently considering switching to VSCode, but only being able to edit one file at a time is a severe limitation. Setting workbench.editor.enablePreview to False had no effect on my Mac. Currently my workaround is to just keep using Atom.
I will take a look in the next couple days.
The code as is is not going to work. It need to refactored.
ls -p | grep -v / | while read x; do rmate $x; done