Integration with SFTP software

Started by SamGoody, May 09, 2011, 11:24:30 AM

Previous topic - Next topic

SamGoody

Would it be possible to improve integration into SFTP software such as WinSCP or Cyberduck?

These programs allow for files to be edited using any IDE.
So that I can click on a file and it opens in Hippo. When I make a change and save the file, the file is saved on the server.
All well and good.

But when I open a second file, it opens another instance of Hippo with both files, so that I soon have six or seven open instances of Hippo. And every change causes every one of the open Hippos to tell me that the file was changed externally - very annoying!

I currently use Notepad++ whenever I edit remote files, which works fine. (In the past I've used JEdit and DreamWeaver, both of which worked as well.)
But this is causing me not to use Hippo, which is really a shame.

Is there any way to have Hippo open files in tabs, as the other editors do?
If not, is there a better way to work with files over SSH?

Also, please, please make Hippo for Mac.
There is nothing worth buying at the moment (Hippo rocks Coda, TextMate, and BBedit with its feet tied behind its back).

SamGoody

#1
Oh, forgot the environment.

Running version 1.49.793
It was a freebie (GiveAwayOfTheDay), so I don't deserve support.
XP SP3

In settings, multiple instances of Hippo are allowed. When disabled, it simply doesn't open the second file.

Stefan

Hi SamGoody and welcome to the forum.

SG> "It was a freebie (GiveAwayOfTheDay), so I don't deserve support."
I think this doesn't really matter. If you have an problem using HippoEDIT, just asks as you have done already :D

- - -

I just did an test to help Alex
Running version 1.49.809
XP SP3

Set HippoEDIT as editor for Total Commander 7.56a with just:
D:\rive\to\folder\HippoEDIT.exe
as command line.

Then did some tests:

menu "Options > General > [X] Allow multiple instances"
and TC opens an new instance of HE for each file open from TC

menu "Options > General > [_] Allow multiple instances"
and TC opens an new Tab for each file open from TC in current running HE

I think the calling app must have the option to detect and reuse an already running instance of an other app.
But since you mention the other editors are called correct it seams it is just an mistaken configuration, stay tuned... we'll let you know ;-)


.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hi SamGoody,

and thanks Stefan for tests! I also think that there is some error with configuration...

Version of GAOTD matter, because guy could not update to newest beta without loosing free registration.

So, back to the problem:
Normally setting of the Allow multiple instances to FALSE should solve the problem. What is happening by you it is some how bug of configuration (because I do not remember something similar for GAOTD version, and there were no fix of this feature after GAOTD release).
So, I will suggest to just "initialize" settings by deleting file Hippoedit.config in user data directory. And than reset Allow multiple instances to FALSE.
Another option which can be checked is Tools->Options->General->Workspace. To have file always open in same window, you need to have same workspaces selected for Default and Viewer. Try to use "viewer" workspace for Viewer this will open a new instance, but with only one one current file after double click or context menu from the explorer.
Check also Tools->File Associations for this type of file you open. Maybe command line differs from standard or have some strange stuff inside (can be the reason, that at all nothing opens).
I think this information should help, because normally this feature works without problems.
And about Mac version: probably this is good idea, but it will cost too much. I think this will be one year of the development + double maintenance later, because code is not platform independent  + I have no experience in Mac programming, so plus half of year :)
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

SamGoody

#4
Thank you for your help.

I've deleted the config file, re-opened HippoEdit, set multiple instances to false.
Reset php to hippo in file associations.
Didn't help.

Now it errors even on the first file:
When I double-click the file in WinSCP, Hippo comes to the front, WindowsXP goes "ding", and the following message pops up:
QuoteThe file "C:\Documents and Settings\...\index.php" doesn't exist anymore.
Keep this file in the editor?

If I choose "yes" and attempt to save the file, I get the popup:
QuoteThe system cannot find the path specified

The same applies with files of type php, html, or unrecognized / no extension at all (such as .htaccess).
Note that the file does show inside the editor, it is just not savable.

SamGoody

#5
I found something useful!!

In WinSCP preferences, there is an option called
"External editor opens each file in separate window (process)"

When this is set to false, HippoEdit works. And Notepad++ does not.
When this is set to true, other editors work, and Hippo does not.
This is a global option, so I cannot have, eg. php files opened in Hippo and html files in another editor.

So, apparently, this has to do with the internal process handling of the editor.
CyberDuck seems to have no such option, assuming instead that you have separate processes - which is no good for Hippo.
(I have not retested after resetting the config)

If you wouldn't mind explaining a little more, it would be appreciated.

alex

Hi SamGoody,

and what about reading of the help for WinSCP (what I have done just now)? It explains everything very well:
http://winscp.net/eng/docs/task_edit#problems_with_some_external_editors

So:
If you set flag External editor opens each file in separate window (process) you need to set in HE Allow Multiple Instances to TRUE;
If you remove flag in WinSCP then you need to unset flag Allow Multiple Instances also.
The same is relevant for all editors your are using.

You can also force HE to start in multi instance mode using command line flags: check hippoedit.exe --help.
If you go with External editor opens each file in separate window (process) and Allow Multiple Instances set to TRUE, I will suggest you to use "viewer" workspace as Viewer. See my previous post about this. When using it, you will get only one file loaded in every session when called from context menu or by double click. or you can use one of the command line flags to close all other files.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

SamGoody

#7
QuoteIt explains everything very well...
It may, but I do not understand it. :o

QuoteThe same is relevant for all editors your are using.
No, it's not.  In other editors, the opposite settings are required.
For example; by default, one cannot open two windows in NP++.
I assume that to be the same as the 'Multiple Instances: False' in Hippo.
Yet, in order to have it open in tabs, I must set  "separate window (process): True"
In Hippo when Multiple is set to false, I must set "separate window (process): False" as well.

It must be that Hippo is right, correct?!
But I don't know why the other editors are all wrong.
If you would explain the reason for Hippo's decision, that would be great.
If you decide that Hippo shouldn't be different, that is your prerogative.
Or, now that things are working, we can just let this thread sleep and hopefully it will help the next Joe that has a problem.
I do appreciate your immediate support, though.

QuoteI will suggest you to use "viewer" workspace as Viewer. See my previous post about this.
Could you please direct me to the thread you refer to?

alex

WinSCP documentation from here.
Opening More Files in a Single Editor Instance
Quote
Some external editors can open multiple files in one process. Usually such editors have some kind of tabbed interface, but it is also the case of new versions of Microsoft Word (2000 and later).

If such an editor is already running and WinSCP runs a second instance to open a new file, then the second instance just notifies the first to open the new file and exits immediately.

To allow using this kind of editor, WinSCP does not treat the file as closed when the editor launched to open it is closed.

If you choose to edit the same file again during the same session, WinSCP will download it to the same temporary directory as before, allowing the external editor to reload the file content in case it still has it opened (assuming the editor can detect the change).

One drawback of this approach is that all of the files ever edited by the current instance of WinSCP are kept in a temporary directory (until WinSCP is closed). WinSCP watches for changes to them all.

If you want to avoid that, you need to make sure that your editor opens each file in a separate window (process). Some editors do that by default while some offer a configuration option for that (see below). If either is the case, then configure your editor as an external editor for WinSCP and enable preference option External editor opens each file in separate window (process). WinSCP will then treat the file as closed when the editor launched to open it is closed. Note that this setting only affects the "edit" operation. So you may want to make sure that editing is the default operation for double-click.

Following list shows how you can select between opening files in a separate or the same window for some favourite editors:
•UltraEdit: Advanced > Configuration > General > General Application Items > Allow multiple instances;
•PSPad: Settings > Program Settings > System Integration > Only One Program Instance;
•Crimson Editor: Tools > Preferences > General > Allow Multiple Instances;
•TextPad: Configure > Preferences > Allow Multiple Instances to Run;
•Notepad++: Use command-line switch -multiInst;
•gVim: Use command-line switch --remote-tab-silent.

Quote•Notepad++: Use command-line switch -multiInst;

So, NP++ can this, and I has checked  - it by default opens all files in same window in different tabs. And you need to force it to use separated instance. Probably you have or older NP++ or have changed defaults for it.

There is nothing special with HE, it works as designed. I think the only problem, is that you have messed up the settings among editors.
Just make all settings in sync and it will work.
With WinSCP there is also nothing special, the flag you mentioned, is only controls lifetime of the temporary files.

What I mentioned was not a separated thread, but my post in this thread before:
QuoteAnother option which can be checked is Tools->Options->General->Workspace. To have file always open in same window, you need to have same workspaces selected for Default and Viewer. Try to use "viewer" workspace for Viewer this will open a new instance, but with only one one current file after double click or context menu from the explorer.

Don't you think that you already got extraordinary technical support in contrast of declared "no technical support" for GAOTD version ;) ? Even for tools which are not HippoEDIT ;)
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

SamGoody

> Don't you think that you already got extraordinary technical support
Absolutely.
I also think I've got an extraordinary program.

While I haven't yet purchased a copy, I have praised it to my students; this is the only paid editor I've ever been impressed with.
Hence my complaints that it doesn't exist for Mac, which is my work environment.
(This copy is on my home machine; I write open- source scripts to relax.)



alex

thanks for the promotion, this is what HE need ;)
generally there are several ways how to get licensed version for free.

With Mac, as I said, it will be too much effort for me, and I do not have enough resources to add all requests for Win version.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]