Edit multiple files simultaneously in external editor

Advertisement

Guest

Edit multiple files simultaneously in external editor

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!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Edit multiple files simultaneously in external editor

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.

Reply with quote

trig
Joined:
Posts:
1

Re: Edit multiple files simultaneously in external editor

martin 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();

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Edit multiple files simultaneously in external editor

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.

Reply with quote

Earls
Guest

PURTY PLEASE?!

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.

Reply with quote

Advertisement

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

Reply with quote

hladk
Guest

Small extension for Multipe edit feature

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Small extension for Multipe edit feature

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
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?

Reply with quote

hladik
Guest

Re: Small extension for Multipe edit feature

I am not sure if I understand. Do you mean that for not technician 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 instance with same name running, it is information 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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Small extension for Multipe edit feature

hladik wrote:

I am not sure if I understand. Do you mean that for not technician 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 definitely implement the option.

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 instance with same name running, it is information 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 wrong file.

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?

Reply with quote

hladik
Guest

Re: Small extension for Multipe edit feature

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?

Reply with quote

Advertisement

You can post new topics in this forum