Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open several files at once #43

Open
bschnabel opened this issue Oct 25, 2017 · 18 comments
Open

open several files at once #43

bschnabel opened this issue Oct 25, 2017 · 18 comments
Labels

Comments

@bschnabel
Copy link

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!

@rafaelmaiolla
Copy link
Owner

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.

@romanmar
Copy link

romanmar commented Nov 1, 2017

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.

@rafaelmaiolla
Copy link
Owner

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.

@romanmar
Copy link

romanmar commented Nov 7, 2017

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.

@ketozhang
Copy link

ketozhang commented Nov 13, 2017

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.

@ampresent
Copy link

Is opening a folder support in plan ?

@iamwyza
Copy link

iamwyza commented Feb 5, 2018

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.

@ampresent
Copy link

I found sshfs is very handy. It's better than remote-vscode, and it's more general in use.

@romanmar
Copy link

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

@bschnabel
Copy link
Author

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

@rafaelmaiolla
Copy link
Owner

You are welcome to contribute and help investigating the issue.

@romanmar
Copy link

@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
}

@bschnabel
Copy link
Author

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.

@kjswanson
Copy link

kjswanson commented Jul 15, 2018

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)

ComfyDust pushed a commit to ComfyDust/remote-vscode that referenced this issue Oct 23, 2018
ComfyDust pushed a commit to ComfyDust/remote-vscode that referenced this issue Oct 24, 2018
…an array instead of a single instance variable
ComfyDust pushed a commit to ComfyDust/remote-vscode that referenced this issue Oct 24, 2018
ComfyDust pushed a commit to ComfyDust/remote-vscode that referenced this issue Oct 24, 2018
…an array instead of a single instance variable
@drscotthawley
Copy link

@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.

@rafaelmaiolla
Copy link
Owner

I will take a look in the next couple days.

@rafaelmaiolla
Copy link
Owner

The code as is is not going to work. It need to refactored.

@Logerfo
Copy link

Logerfo commented Jul 17, 2019

ls -p | grep -v / | while read x; do rmate $x; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants