vim-dirvish
vim-dirvish copied to clipboard
dirvish for ssh / scp / remote
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'
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.
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.
Thanks, I'll check out those other methods. The reason I asked is netrw does it very smoothly.
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
lynx -dump -nonumbers file://$PWD lynx actually works well, not adding formatting and html nonsense
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
#86 shows the barebones implementation. i've only tested on a local ftp server
see also https://github.com/bounceme/remote-viewer
good progress with ^^. still depends on an awful hack though: https://github.com/bounceme/remote-viewer/blob/master/plugin/remotedir.vim#L78