Skip to content

Instantly share code, notes, and snippets.

@watagashi watagashi/.vimrc
Last active Jun 14, 2017

Embed
What would you like to do?
TwitVim のプロキシ設定を環境変数から設定 ref: http://qiita.com/watagashi/items/0bd0d4d763ea774d97a5
if exists('$HTTP_PROXY')
let s:proxy_url_pattern =
\ '^\%(\([^:]*\):\/\/\)\='
\ . '\%(\([^:@]*\)\(:[^@]*\)\=@\)\='
\ . '\([^:]*\)\%(:\(\d*\)\)\=/\=$'
let g:twitvim_proxy = substitute($HTTP_PROXY,
\ s:proxy_url_pattern, '\4:\5', '')
let s:proxy_login = substitute($HTTP_PROXY,
\ s:proxy_url_pattern, '\2', '')
let s:proxy_pass = substitute($HTTP_PROXY,
\ s:proxy_url_pattern, '\3', '')
let g:twitvim_proxy_login = substitute(s:proxy_login . s:proxy_pass,
\ '%40', '@', 'g')
endif
:help twitvim_proxy
:help twitvim_proxy_login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.