I tried netrw and putty, but it didn;t work.
I never got putty to work (putty's not really meant for that...), but
I did with netrw and pscp. I renamed pscp.exe to scp.exe (making sure
it's in the path) and it worked fine. There are tips on the wiki on
setting variables in your vimrc to tell netrw what executable you want
to use for a given protocol, if you don't want to rename the
executable.
I ended up preferring WinSCP with it configured it to use gvim as my
text editor. You might look into that as well.
On Mar 4, 5:14 am, Dan Wierenga <dwiere...@gmail.com> wrote:
Yes, i opened single file via scp. The direcotory still can't be
opened.
The error messages:
Error detected while processing function
netrw#Nread..netrw#NetRead..<SNR>35_Net
rwBrowse..<SNR>35_NetrwGetBuffer..<SNR>35_NetrwListSettings:
line 6:
E303: Unable to open swap file for "scp:\\mik...@192.168.1.102\htdocs
\", recove
ry impossible
"scp:\\mik...@192.168.1.102\htdocs\" --No lines in buffer--
Error detected while processing function
netrw#Nread..netrw#NetRead..<SNR>35_Net
rwBrowse..<SNR>35_PerformListing..<SNR>35_NetrwRemoteListing..netrw#ErrorMsg:
line 35:
E303: Unable to open swap file for "NetrwMessage", recovery impossible
"NetrwMessage" --No lines in buffer--
Error detected while processing function
netrw#Nread..netrw#NetRead..<SNR>35_Net
rwBrowse..<SNR>35_PerformListing:
line 118:
E121: Undefined variable: w:netrw_bannercnt
E15: Invalid expression: !g:netrw_banner || line("$") >=
w:netrw_bannercnt
Error detected while processing function
netrw#Nread..netrw#NetRead..<SNR>35_Net
rwBrowse..<SNR>35_PerformListing..<SNR>35_NetrwWideListing:
line 2:
E121: Undefined variable: w:netrw_liststyle
E15: Invalid expression: w:netrw_liststyle == s:WIDELIST
Error detected while processing function
netrw#Nread..netrw#NetRead..<SNR>35_Net
rwBrowse..<SNR>35_PerformListing..<SNR>35_NetrwTreeListing:
line 1:
then i press 'enter', another message:
**error** (netrw) ssh is not executable on your system
If you want to use vim via ssh depend on putty under windows, it must
combine pscp/psftp with plink. pscp/psftp used to connect, plink used
to execute command on server, for example: list files and directory in
'ls'.
This is my settings:
'' list files, it's the key setting, if you haven't set, you will get
blank buffer
let g:netrw_list_cmd = "plink mik...@192.168.1.102 ls -Fa"
" if you haven't add putty directory in system path, you should
specify scp/sftp command
"let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
"let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
set dir=C:\vim-temp
usage:
:e scp://mik...@192.168.1.102/htdocs/
The last character must be a slash to mean you want to get files list.
Regards,
Chip Campbell
P13. I'm a Windows + putty + ssh user, and when I attempt to browse,
the directories are missing trailing "/"s so netrw treats them
as file transfers instead of as attempts to browse
subdirectories. How may I fix this?
(mikeyao) If you want to use vim via ssh and putty under Windows,
try combining the use of pscp/psftp with plink. pscp/psftp will
be used to connect and plink will be used to execute commands on
the server, for example: list files and directory using 'ls'.
These are the settings I use to do this:
" list files, it's the key setting, if you haven't set,
" you will get a blank buffer
let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"
" if you haven't add putty directory in system path, you should
" specify scp/sftp command. For examples:
"let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
"let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
Obviously I haven't tried the "plink HOSTNAME ls -Fa" but I suspect that
it will work. Please try it and let me know.
Thank you,
Chip Campbell
On Mar 4, 11:01 pm, Charles Campbell <Charles.E.Campb...@nasa.gov>
wrote:
> mikeyaowrote:
> > I solved problem.
>
> > If you want to use vim via ssh depend on putty under windows, it must
> > combine pscp/psftp with plink. pscp/psftp used to connect, plink used
> > to execute command on server, for example: list files and directory in
> > 'ls'.
>
> > This is my settings:
>
> > '' list files, it's the key setting, if you haven't set, you will get
> > blank buffer
> > let g:netrw_list_cmd = "plink mike...@192.168.1.102 ls -Fa"
> > " if you haven't add putty directory in system path, you should
> > specify scp/sftp command
> > "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
> > "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
> > set dir=C:\vim-temp
>
> > usage:
> > :e scp://mike...@192.168.1.102/htdocs/
> > The last character must be a slash to mean you want to get files list.
>
> Hello -- do you mind if I put an edited version of this into netrw's help?
>
> Regards,
> Chip Campbell
I'm glad to collect this tip in help file. :)
This option didn't work well on remote directory. It always opens new
horizontal window. But local directory is ok.
The problem is caused by minibufexpl.vim. The netrw found previous
window didn't what i want. Removing this plugin is ok.