vim-dirvish icon indicating copy to clipboard operation
vim-dirvish copied to clipboard

dirvish for ssh / scp / remote

Open krruzic opened this issue 9 years ago • 11 comments

Maybe I'm just stupid (I'm pretty new to vim in general) but when running dirvish with a file open via scp, it doesn't work. Support for this would be nice

(in case you want the error): dirvish: invalid directory: 'scp://[email protected]/current/path'

krruzic avatar Oct 25 '16 01:10 krruzic

In general support for scp comes from netrw. If I could suggest something then try sshfs instead of scp or some kind of filewatcher with rsync instead, should work better in general.

hauleth avatar Oct 25 '16 09:10 hauleth

As mentioned by @hauleth, FUSE/sshfs provides an abstraction at the filesystem layer (as opposed to some other "middleware"), so that any dumb local navigator (like drivish) works without adding special-case support for scp, FTP, webdav, ..., as netrw does.

It might be interesting to use a strategy pattern as dispatch.vim does, so that remote operations are exposed to dirvish in a normalized way. Authentication is the most annoying part of this.

justinmk avatar Oct 25 '16 09:10 justinmk

Thanks, I'll check out those other methods. The reason I asked is netrw does it very smoothly.

krruzic avatar Oct 25 '16 23:10 krruzic

w3m -dump file://$PWD works, using the generic protocol approach, so it would in theory work for any url supported by w3m. that introduces a dependency though, and many probable issues, and is just useless info for the most part

bounceme avatar Jul 12 '17 00:07 bounceme

lynx -dump -nonumbers file://$PWD lynx actually works well, not adding formatting and html nonsense

bounceme avatar Jul 12 '17 01:07 bounceme

i got dirvish to work using the file:// protocol with lynx, as opposed to glob(). the bad part is that there is a lot of code which makes isdirectory() isreadable() calls, which obviously fail with :Dirvish ftp://user:pass@host

bounceme avatar Jul 12 '17 07:07 bounceme

#86 shows the barebones implementation. i've only tested on a local ftp server

bounceme avatar Jul 12 '17 21:07 bounceme

see also https://github.com/bounceme/remote-viewer

justinmk avatar Oct 07 '17 16:10 justinmk

good progress with ^^. still depends on an awful hack though: https://github.com/bounceme/remote-viewer/blob/master/plugin/remotedir.vim#L78

bounceme avatar Nov 06 '17 07:11 bounceme