lukasz-wronski / vscode-ftp-sync

Ftp Sync plugin for Visual Studio Code

Home Page:https://marketplace.visualstudio.com/items/lukasz-wronski.ftp-sync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ideas to improve sync process

EthraZa opened this issue · comments

Your extension is awesome and I'm already enjoining it.
I just would like to ask for one thing:

  • The possibility to manually upload/download/sync a single file.

Here we are two guys working in the same remote server, so we can just use S/FTP instead of Git, but if I sync the hole folder and he is working in a file in the same folder, something can go wrong no?
And let the "upload on save" on is cool, but sometimes scary since VSCode does not have history backups and I save a lot while typing.
Sometimes I just like to force download a single file before start working on it, just to be sure.

Anyways thank you for this cool new extension.

@EthraZa: This is nice idea and should be easy to implement.

Adding two commands "upload current file" and "download current file" should be okay?
It will automatically download or upload file from active editor. What you think?

Or it will be a better idea to give user choose file dialog like in sync/download commands?

Hi, you are quick. Cool.
A confirmation would be useful mainly in sync, informing if it is going to upload or download and let you cancel if it is not what you want. For the forced download/upload it would be good for mistakes since there is no history backup on editor, but here, what is simpler to implement is enough. :)

Maybe it can be always a sync with dialog options to force download/upload or it would make the simple quick uploads more prone to delays due to check sync?

I'd like to have sync, download and upload operations separated - I'm kind of doing this extension to work like sublime sftp plugin. They have all those operations separated.

About sync confirmation - that might be nice, but what should it show.. list of files to be synced/downloaded?

I think I can add this confirmation as an option in config file, so you can turn it if you'd like, but if you'd like to operate quickly you can keep it turned off.

Optional confirmations are awesome, best of both worlds.
About separete operations you are probably right. When you want to quick upload you don't want any sync in your way (or any dialog for that matter).

Abou how up/down/sync handle operations and dialogs, well, right now I'm coming from Eclipse with Aptana plugin. It gives me 3 buttons (up/down and sync) for what is selected on the file tree, it can be a folder or a file and the operation will act on it.

The sync screen gives the follwoing options:
Per file:
[] Skip Sync
For all:
[] Delete orphaned files on local
[] Delete orphaned files on remote

At the same time it shows who is going to be uploaded and who is going to be downloaded and a files count to be synced.
Just found a shot: http://4.bp.blogspot.com/-Cfn6-wmg_ss/T8kDlAEqhFI/AAAAAAAAAPE/zX3lgPHl11A/s1600/Aptana-FTP-Sync.jpg

Maybe it is overkill, but what I really like is it acting over what is selected on the file tree, so I can up/down/sync the hole folder or just the file I'm working on.

I'll analyze it later, but it seems like a good way to develop this extension.

The one thing that limits me right now is vscode api which does not allow to create custom windows and such - have to work with what is available, so displaying the list of files to be synced won't be easy :)

Maybe you can use the editor and open up a new json file populated with the files to be synced so we can manually tweek it and save when we are done or close to cancel.
Hehe, it would be the ultimate hackish dialog. ;)

This idea is brilliant. I like it. It will open editor with changes to be made and then there will be command like "commit" to do the sync according to esites file.

Nice! I'm looking forwarding to test it.

As a side effect, I guess it will fix the problem I'm facing now trying to sync a new created folder (.vscode folder in this case) where it does not yet exist in the server. Since we doesn't have a force upload, the sync gives error: Ftp-sync: Sync local to remote error: Error: 553 Can't open that file: No such file or directory.
I know here is not the place for this error, just telling, since you gonna implement the upload soom. :)

This idea is brilliant. I like it. It will open editor with changes to be made and then there will be command like "commit" to do the sync according to esites file.

@EthraZa Version 0.2.0 has just been released - you can check it and let me know if new features works for you. Thanks.