Home Download Buy Blog Forum Support

WinSCP integration plugin

WinSCP integration plugin

Postby gpfsmurf on Fri Nov 13, 2009 10:12 pm

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)
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: WinSCP integration plugin

Postby vim on Sun Nov 15, 2009 9:39 am

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!
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: WinSCP integration plugin

Postby myel on Sun Nov 15, 2009 8:55 pm

jeah, it's a great plugin.

can't wait to see recursive directory scanning ( with caching ;) )

plugins like these show how much can be done with plugins...
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Re: WinSCP integration plugin

Postby gpfsmurf on Mon Nov 16, 2009 8:39 pm

vim wrote:- will be nice to have 'open in browser' with the real url, is it possible at all?

It's possible to have something like "ftp://hostname/remotedir/filename", is that what you want?
vim wrote:- 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)?

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
vim wrote:- possible bug? somehow, with some filenames and directories i get a leading space before their name, which prevent from successfully opening it.

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
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: WinSCP integration plugin

Postby vim on Tue Nov 17, 2009 2:34 pm

gpfsmurf wrote:
vim wrote:- will be nice to have 'open in browser' with the real url, is it possible at all?

It's possible to have something like "ftp://hostname/remotedir/filename", is that what you want?
no, i was thinking of the http address, but maybe i am way off here (to open html pages on the site)

gpfsmurf wrote: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


see:
sublime-screenshot.png
screen shot of sublime
sublime-screenshot.png (36.58 KiB) Viewed 10157 times


and:
winscp-screenshot.png
screen shot of winscp.com
winscp-screenshot.png (12.29 KiB) Viewed 10142 times
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: WinSCP integration plugin

Postby vim on Tue Nov 17, 2009 4:51 pm

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.
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: WinSCP integration plugin

Postby gpfsmurf on Tue Nov 17, 2009 9:36 pm

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

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

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: http://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.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: WinSCP integration plugin

Postby myel on Wed Nov 18, 2009 10:02 am

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 ;) ).

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).
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Re: WinSCP integration plugin

Postby vim on Wed Nov 18, 2009 11:28 am

gpfsmurf wrote:I fixed the bug, update to the tip to get the latest changes


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.
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: WinSCP integration plugin

Postby myel on Wed Nov 18, 2009 1:08 pm

@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 :/
myel
 
Posts: 88
Joined: Sat Mar 22, 2008 11:26 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 7 guests