Created
June 18, 2013 13:46
-
-
Save osyo-manga/5805484 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| augroup Network | |
| autocmd! | |
| augroup END | |
| augroup test | |
| autocmd! | |
| autocmd SourceCmd https://* call s:source_web_file(substitute(expand("<afile>"), '\\', '/', 'g')) | |
| autocmd SourceCmd http://* call s:source_web_file(substitute(expand("<afile>"), '\\', '/', 'g')) | |
| augroup END | |
| function! s:source_web_file(uri) | |
| let temp = tempname() | |
| call system(printf("curl %s -o %s", a:uri, temp)) | |
| source `=temp` | |
| endfunction | |
| " source https://gist.github.com/osyo-manga/5805362/raw/38ca08e6240e0a985c980e2b821e196002f9fd57/test.vim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment