newinnovations / remote-edit-ni

Atom package to browse and edit remote files using SSH and FTP. This fork supports atom 1.41.x and adds some new features.
https://atom.io/packages/remote-edit-ni
MIT License
18 stars 2 forks source link

Preview Image through remote-edit #22

Open janstieler opened 6 years ago

janstieler commented 6 years ago

Hi, If I open a imagefile like .png from a server it will opend in cryptoasciistyle and not through the core-package image-view. Can it be that the image-header is not right served?

It would be great if I could preview images also in Atom from the server.

Cheers

urban-1 commented 6 years ago

Hi @janstieler

I am not sure this is doable... Currently this plugin overrides the default TextEditor in order to handle open and save operations over SFTP/FTP. To handle different file types we would either need to re-write the image-view (or any other) plugin or even better create an IO layer/library to handle all file operations which would require core atom architecture changes (I imagine this similar to KDE kio layer).

That being said, we might be able to partly support other file types in "view-only" mode. remote-edit-ni does have the capability to download files from the server locally, thus we could try to detect the file type and use another extension to handle it. However, I don't see how saving or refreshing would work...

No promises, but if I get some time I will try to make a PoC and see if this is possible :)