As I said in a comment, the netrw plugin, which handles http://, doesn't handle https:// (this from looking at the plugin code). I went into the code and got https:// working (no guarantees it's bug-free, but it worked for the couple sites I tried). I've created a pair of patches, for netrw.vim and netrwPlugin.vim. Here's how to apply them, keeping the originals untouched and the patched versions in your local configuration:
- Make sure you have a
~/.vim/autoload and ~/.vim/plugin directory.
- Download the patches, remember where you saved them (I'll assume it's at
~/.vim/patches/netrw.patch and ~/.vim/patches/netrwPlugin.patch)
cp /usr/share/vim/vimcurrent/autoload/netrw.vim ~/.vim/autoload
cp /usr/share/vim/vimcurrent/plugin/netrwPlugin.vim ~/.vim/plugin
patch ~/.vim/autoload/netrw.vim ~/.vim/patches/netrw.patch
patch ~/.vim/plugin/netrwPlugin.vim ~/.vim/patches/netrwPlugin.patch
This works on my vim, 7.3, hopefully yours too. If not, use the changes as a guide and see if you can hack it.
In case the pastebins disappear, here they are:
netrwPlugin.patch
56c56
< au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(expand("<amatch>"))
---
> au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(expand("<amatch>"))
netrw.patch
682c682
< if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^http://'
---
> if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^http://' && choice !~ '^https://'
835c835
< elseif b:netrw_method == 5
---
> elseif b:netrw_method == 5 || b:netrw_method == 50
850c850,854
< exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)
---
> if b:netrw_method == 5
> exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)
> else
> exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("https://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)
> endif
853c857,861
< exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)
---
> if b:netrw_method == 5
> exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)
> else
> exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("https://".g:netrw_machine.b:netrw_fname,1)
> endif
865c873,877
< exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)
---
> if b:netrw_method == 5
> exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)
> else
> exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("https://".g:netrw_machine.netrw_html,1)
> endif
1565a1578
> let httpsurm = '^https://\([^/]\{-}\)\(/.*\)\=$'
1598a1612,1618
> " Method#5.5: https://user@hostname/...path-to-file {{{3
> elseif match(a:choice,httpsurm) == 0
> " call Decho("https://...")
> let b:netrw_method = 50
> let g:netrw_machine= substitute(a:choice,httpsurm,'\1',"")
> let b:netrw_fname = substitute(a:choice,httpsurm,'\2',"")
>
7075c7095
< if w:netrw_method == 2 || w:netrw_method == 5
---
> if w:netrw_method == 2 || w:netrw_method == 5 || w:netrw_method == 50
,https://like I've done for other things.