Topic "Edit multiple files simultaneously in external editor"

Author Message
Guest




I'd like to use WinSCP to do general development on remote servers. Unfortunately, this is very difficult when you can only have one remote file open at a time in an external editor (ie. EditPlus). Are there plans, or would you consider supporting multiple remote files simultaneously open in an external editor? Seems like it would be possible using the local temp files? Thanks!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
This requires implementation of transfer queue. The queue will be added in the version after the next version (this week). And maybe after that I can add what you ask for.
_________________
Martin Prikryl
trig
[View user's profile]

Joined: 2004-06-22
Posts: 1
prikryl wrote:
This requires implementation of transfer queue. The queue will be added in the version after the next version (this week). And maybe after that I can add what you ask for.


Hi Prikryl,

I would also like to vote for this feature. Incidentally, I have some code that uses windows change notification objects and file hashes to tell when a particular file has been modified... you can have it or look at it if you like... just let me know. I've only posted the interface below (the constructors are non-blocking).

Thanks for the great (free) tool.

--tristan

=============
///
/// This class watches a file for changes. It uses a windows notification object to
/// tell if the contents of the directory containing the file change.
/// A separate thread waits on the object. If the wait object gets signalled, a file hash
/// is computed and compared to the original file hash. A message is posted if the
/// file really changed.
///
class FileWatcher
{
public:
///
/// Creates a file watcher object. The object is not watching anything if this constructor is used.
/// Call Start() to make it start.
///
FileWatcher() : hWatchThread(0), hExitSemaphore(0) { }

///
/// Creates a file watcher object that watches the specified file. If the file changes, the message
/// is posted to the supplied window. Message parameters are optional.
///
FileWatcher(const tString& filename, hWnd hwnd, uint32 message, wParam w = 0, lParam l = 0) : hWatchThread(0), hExitSemaphore(0) { Start(filename, hwnd, message, w, l); }

virtual ~FileWatcher() { Stop(); }

///
/// Starts watching the specified file. If a file previous file was being watched it
/// will stop watching the old one and start watching the new one. If a change in the
/// file occurs, it will post the message to the window handle with the supplied parameters.
///
void Start(const tString& filename, hWnd, uint32 message, wParam = 0, lParam = 0);

///
/// Stops watching the file.
///
void Stop();
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
trig wrote:
I would also like to vote for this feature. Incidentally, I have some code that uses windows change notification objects and file hashes to tell when a particular file has been modified... you can have it or look at it if you like... just let me know. I've only posted the interface below (the constructors are non-blocking).

Thanks. I know Windows file change notification feature. In fact WinSCP uses it already, for example in "Keep remote directory up to date" function.

The feature you ask for probably won't be in the next version, but I plan it to the one after.
_________________
Martin Prikryl
Earls

Guest


Hey.

Just wondering what the ETA for the feature is. It is most important to me.

Thanks a lot for this program, keep up the great work.
Guest




I would also have great use for this feature, and I'm currently waiting to switch over completely until it has been implemented.

Otherwise this applictation works perfect, thanks a lot for making it this good and keeping it free!

Cheers
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
I plan to add this to the next major release (3.7).
_________________
Martin Prikryl
Guest




Great job on this feature, works perfect!

Thanks a bunch!
hladk

Guest


Anonymous wrote:
Great job on this feature, works perfect!

Thanks a bunch!


Hi Martin,

My congrats for next great feature. But I have yet request for one small (I hope) modification:

If you use editor with multiple files inside one instance of editor you are not able edit more then first file. If you run editor.exe with second file editor.exe file starts second time and thes passes filename to first instance of editor and then exits. That is signal for Winscp to delte temporary edited file.

I hope for this case it is possible to add to Winscp editor options option for switching editing monitor to mode which keeps temporary files until you end every instances (in fact only one) of editor.

What is your opinion about this extension? I use great but still slim editor textpad which have this problem.

If you wil decide to add this, I can test this new extension.

Again congrat and hodne stesti pri volbe dalsich perfektnich rozsireni

Zdenek Hladik
zdenek zavinac hladik cezet
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
The problem was discussed already in topics
Multiple edit feature doesn't seem to work correctly with MDI editors.
External editor problems

As I have wrote is one of them
Quote:
I was also considering the option already. However I think that it is too "technical" decision for regular user. I'll think of something else.

So far I have not found better solution. Any idea?
_________________
Martin Prikryl
hladik

Guest


prikryl wrote:
The problem was discussed already in topics
Multiple edit feature doesn't seem to work correctly with MDI editors.
External editor problems

As I have wrote is one of them
Quote:
I was also considering the option already. However I think that it is too "technical" decision for regular user. I'll think of something else.

So far I have not found better solution. Any idea?


I am not sure if I undersand. Do you mean that for not technican it is too hard to understand what new option does? I think that there in this type of program are lot of hard to understand (for non techs) decision.

OK. So if you want not to add option, you can add to inside your code for launching of editor time measurement and if time of running of new instance is too short (under 1 second?) and there is still minimally one istance with same name running, it is inforamtion that Editor probably runs in One instance mode. If I understand, you check file dates for decision to queue upload no ending of editor task? Is it true? On task disappearing you only clean and remove temp. directory.

I am very hungry for this option because very often i forget this restriction and I make heavy sources mods and then discover that changes will not upload back because this was second edited file...

Zdenek Hladik
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
hladik wrote:
I am not sure if I undersand. Do you mean that for not technican it is too hard to understand what new option does? I think that there in this type of program are lot of hard to understand (for non techs) decision.

I agree, but I still hope to find better solution for this problem. If not, I'll definitelly implement the option.

Quote:
OK. So if you want not to add option, you can add to inside your code for launching of editor time measurement and if time of running of new instance is too short (under 1 second?) and there is still minimally one istance with same name running, it is inforamtion that Editor probably runs in One instance mode. If I understand, you check file dates for decision to queue upload no ending of editor task? Is it true? On task disappearing you only clean and remove temp. directory.

I have already implemented several such "heuristics" analysis for other problems. In all cases I have finally removed them, because they simply have not worked in some situations. In this case the editor may not be closed within one second, it may take longer. But for longer timeout, one can never know if the editor was closed by itself or by "quick" user who realised that he had opened wront file.

Quote:
I am very hungry for this option because very often i forget this restriction and I make heavy sources mods and then discover that changes will not upload back because this was second edited file...

Error message should be displayed for the "second edited file". Is it?
_________________
Martin Prikryl
hladik

Guest


Let me ask if something changed in state of planing of this extension?

I am very very unhappy of current behaviour because I mainly use Winscp to edit configuration files. Much more often than file transfer. May be this is not very often case for most of users but administrators are exception. I very often make heavy modification to config file and if I try to save it I will get filename ask dialog. So I must copy file to clipboard, close editor (with all files) and reopen edited file, then select all and paste from clipboard. This is very unconfortable...

Please enable support of multifiles edit. May be you can hide it by ommittin GUI control and allow only regedit change?
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License