On 10/6/06, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
Victor Hsieh wrote: > With vim 7.0 and netrw.vim version 98, I've encountered a problem > when trying to "vim http://somewhere/file.txt". This patch will fix > the problem: This would silently let users overwrite their own work that they had not saved. I don't think this would be a good idea.
In this case, explicitly open the url via "vim http://..." can be detected, and there's no more risk. I suppose this is a possible solution :)
Netrw uses the trailing slash to determine whether to browse the remote directory or to bring it up for editing. Consider ftp://hostname/some/directory/ -- that trailing slash tells netrw to display directory contents, not attempt to edit a file called "directory". Now, http://... normally uses wget, and there's no corresponding wput; hence, "editing" an http://... url is a read-only operation. So, if one tries to edit a "directory" with the http protocol (ie. wget), netrw does the best it can and brings it up using ftp. Of course, ftp is a read and write capable protocol, so one can really edit it.
I know. But I just want to read the html code or so with my favoriate editor ;) I used to do it with vim6. Actually in most case, connecting to ftp://somewhere (when open http://somewhere) is not gonna work.
Regards, Chip Campbell
Regards, Vicotr