Sublime Forum

WinSCP integration plugin

#1

First version of the WinSCP integration plugin is now ready to use.

You can download it here: winscp plugin

Either use Mercurial to update to the tag “v1.0”, or click on “Downloads”, and get the .zip for tag “v1.0”

You will also need AAALoadFirstExtensions

Use Mercurial to update to rev 39 (changeset 9ce0e6c22549)

0 Likes

Remote editing via FTP
#2

works great!

it took me few times to understand anytime i need WinSCP i just have to press F12.

few comments:

  • will be nice to have ‘open in browser’ with the real url, is it possible at all?
  • maybe creating a sublime-project automatically to cover the remote directory, is it possible at all? (i.e. remote list of the whole directory tree)?
  • possible bug? somehow, with some filenames and directories i get a leading space before their name, which prevent from successfully opening it.

over all seems great!

0 Likes

#3

jeah, it’s a great plugin.

can’t wait to see recursive directory scanning ( with caching :wink: )

plugins like these show how much can be done with plugins…

0 Likes

#4

It’s possible to have something like “ftp://hostname/remotedir/filename”, is that what you want?

Yes I was talking about this with myel, we’re trying to find the ‘right way’ to do this. Please check out this page and add your thoughts on the matter: project-features-recursive-browsing-of-one-given-remote

Yes its probably a bug. The filenames are parsed from the ftp LIST command, which has a different output on each kind of FTP server, so the parsing is not perfect. It’s done by grizzled/net/ftp/parse.py, which i’ve already modified to work with newer FTP servers.
To fix it, I need something from you:

  • in a CMD window, run c:\program files\winscp\winscp.com (.com, not .exe)
  • type “open mysessionname” where mysessionname is the name that you see in the WinSCP stored sessions
  • type “cd thedir” where thedir is a dir that has files with problems
  • type “ls”, which will send a “list” command
  • send me the output (specifically the lines of some file/dirs that have the problem)
  • type ‘exit’ to close the session and quit
0 Likes

#5

[quote=“gpfsmurf”]

It’s possible to have something like “ftp://hostname/remotedir/filename”, is that what you want?[/quote]

no, i was thinking of the http address, but maybe i am way off here (to open html pages on the site)

[quote=“gpfsmurf”]Yes its probably a bug. The filenames are parsed from the ftp LIST command, which has a different output on each kind of FTP server, so the parsing is not perfect. It’s done by grizzled/net/ftp/parse.py, which i’ve already modified to work with newer FTP servers.
To fix it, I need something from you:

  • in a CMD window, run c:\program files\winscp\winscp.com (.com, not .exe)
  • type “open mysessionname” where mysessionname is the name that you see in the WinSCP stored sessions
  • type “cd thedir” where thedir is a dir that has files with problems
  • type “ls”, which will send a “list” command
  • send me the output (specifically the lines of some file/dirs that have the problem)
  • type ‘exit’ to close the session and quit[/quote]

see:

and:

0 Likes

#6

btw, regarding project, two options i can think of:

  1. implementing recursive ls, which will run in the background upon connection and will list all files. once it done the result will be cached for the session. and if new files are created with sublime on remote locaion, those can be added to the list. the list can be updated asynchronously if the user already tries to use this (sublime support it).

  2. use plink (installed with putty) to execute remote commands, so the ‘find’ command could be used to map the whole tree of files, and like (1) the result can be cached.

0 Likes

#7

I fixed the bug, update to the tip to get the latest changes

Well if there’s a deterministic rule to create the URL then yeah… We have the FTP hostname, remote dir, and filename to work with.
Something like this: hostname/directory/filename
where the directory can be a subdirectory of the remote dir (anything under ‘…htdocs/’ or ‘…www/’, for instance)

We could also use per-project options.

0 Likes

#8

getting the directory tree via putty/find would be quite fast, but it won’t work with ftp-only servers ( sadly, some people still have to work that way :wink: ).

for an universal solution, the recursive listing via winscp would be the way to go (works with ftp), but it’s slow on deep trees.

maybe asynchronously building of the directory-tree and using some kind of intelligent cache like you mentionend, would hide the slowness of that approach from the user (at least caching will, after the initial directory-tree is build).

0 Likes

#9

thanks, it works! there an issue which might be a sublime bug, but when using it without any open tab, all the status messages are not visible - not displayed.

0 Likes

#10

@sublimator:

that depends:

at work i have minimal/no svn. most development is done on remote live/staging servers (jeah frightens me too).

at home 100% is local and in svn.

i believe my work situation is not so uncommon :confused:

0 Likes

#11

[quote=“myel”]getting the directory tree via putty/find would be quite fast, but it won’t work with ftp-only servers ( sadly, some people still have to work that way :wink: ).

for an universal solution, the recursive listing via winscp would be the way to go (works with ftp), but it’s slow on deep trees.

maybe asynchronously building of the directory-tree and using some kind of intelligent cache like you mentionend, would hide the slowness of that approach from the user (at least caching will, after the initial directory-tree is build).[/quote]

  • The caching should be simple to achieve: just pickle a list of filenames/directory names, using the stored session name as a key.
  • The recursive ‘ls’ must be done in the background, and must not stop the user from downloading/uploading files at the same time.
  • It should be optional, per-project. We could have a “:refresh list:” command - or should it be done automatically?
  • Sublime Project: we need to be able to specify one remote dir in the project options. Each mount point will be relative to that path. I think there’s a way to have project options but I can’t find it in the docs.
0 Likes