remove deprecated variables

over 2 years is more than enough warning...
This commit is contained in:
Bailey Ling 2016-01-28 09:54:14 -05:00
parent 1d8408a7f8
commit b7a74b1748
5 changed files with 13 additions and 47 deletions

View File

@ -5,32 +5,5 @@ function! airline#deprecation#check()
if !exists('g:loaded_airline_themes') if !exists('g:loaded_airline_themes')
echom 'airline themes have been migrated to github.com/vim-airline/vim-airline-themes and will be removed from the core in the near future.' echom 'airline themes have been migrated to github.com/vim-airline/vim-airline-themes and will be removed from the core in the near future.'
endif endif
if exists('g:airline_enable_fugitive') || exists('g:airline_fugitive_prefix')
echom 'The g:airline_enable_fugitive and g:airline_fugitive_prefix variables are obsolete. Please read the documentation about the branch extension.'
endif
let tests = [
\ [ 'g:airline_paste_symbol', 'g:airline_symbols.paste' ],
\ [ 'g:airline_readonly_symbol', 'g:airline_symbols.readonly' ],
\ [ 'g:airline_linecolumn_prefix', 'g:airline_symbols.linenr' ],
\ [ 'g:airline_branch_prefix', 'g:airline_symbols.branch' ],
\ [ 'g:airline_branch_empty_message', 'g:airline#extensions#branch#empty_message' ],
\ [ 'g:airline_detect_whitespace', 'g:airline#extensions#whitespace#enabled|show_message' ],
\ [ 'g:airline_enable_hunks', 'g:airline#extensions#hunks#enabled' ],
\ [ 'g:airline_enable_tagbar', 'g:airline#extensions#tagbar#enabled' ],
\ [ 'g:airline_enable_csv', 'g:airline#extensions#csv#enabled' ],
\ [ 'g:airline_enable_branch', 'g:airline#extensions#branch#enabled' ],
\ [ 'g:airline_enable_bufferline', 'g:airline#extensions#bufferline#enabled' ],
\ [ 'g:airline_enable_syntastic', 'g:airline#extensions#syntastic#enabled' ],
\ [ 'g:airline_enable_eclim', 'g:airline#extensions#eclim#enabled' ],
\ ]
for test in tests
if exists(test[0])
let max = winwidth(0) - 16
let msg = printf('The variable %s is deprecated and may not work in the future. It has been replaced with %s. Please read the documentation.', test[0], test[1])
echom msg[:max].'...'
endif
endfor
endfunction endfunction

View File

@ -160,17 +160,17 @@ function! airline#extensions#load()
call airline#extensions#undotree#init(s:ext) call airline#extensions#undotree#init(s:ext)
endif endif
if (get(g:, 'airline#extensions#hunks#enabled', 1) && get(g:, 'airline_enable_hunks', 1)) if get(g:, 'airline#extensions#hunks#enabled', 1)
\ && (exists('g:loaded_signify') || exists('g:loaded_gitgutter') || exists('g:loaded_changes') || exists('g:loaded_quickfixsigns')) \ && (exists('g:loaded_signify') || exists('g:loaded_gitgutter') || exists('g:loaded_changes') || exists('g:loaded_quickfixsigns'))
call airline#extensions#hunks#init(s:ext) call airline#extensions#hunks#init(s:ext)
endif endif
if (get(g:, 'airline#extensions#tagbar#enabled', 1) && get(g:, 'airline_enable_tagbar', 1)) if get(g:, 'airline#extensions#tagbar#enabled', 1)
\ && exists(':TagbarToggle') \ && exists(':TagbarToggle')
call airline#extensions#tagbar#init(s:ext) call airline#extensions#tagbar#init(s:ext)
endif endif
if (get(g:, 'airline#extensions#csv#enabled', 1) && get(g:, 'airline_enable_csv', 1)) if get(g:, 'airline#extensions#csv#enabled', 1)
\ && (get(g:, 'loaded_csv', 0) || exists(':Table')) \ && (get(g:, 'loaded_csv', 0) || exists(':Table'))
call airline#extensions#csv#init(s:ext) call airline#extensions#csv#init(s:ext)
endif endif
@ -180,13 +180,13 @@ function! airline#extensions#load()
let s:filetype_regex_overrides['^int-'] = ['vimshell','%{substitute(&ft, "int-", "", "")}'] let s:filetype_regex_overrides['^int-'] = ['vimshell','%{substitute(&ft, "int-", "", "")}']
endif endif
if (get(g:, 'airline#extensions#branch#enabled', 1) && get(g:, 'airline_enable_branch', 1)) if get(g:, 'airline#extensions#branch#enabled', 1)
\ && (exists('*fugitive#head') || exists('*lawrencium#statusline') || \ && (exists('*fugitive#head') || exists('*lawrencium#statusline') ||
\ (get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine'))) \ (get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine')))
call airline#extensions#branch#init(s:ext) call airline#extensions#branch#init(s:ext)
endif endif
if (get(g:, 'airline#extensions#bufferline#enabled', 1) && get(g:, 'airline_enable_bufferline', 1)) if get(g:, 'airline#extensions#bufferline#enabled', 1)
\ && exists('*bufferline#get_status_string') \ && exists('*bufferline#get_status_string')
call airline#extensions#bufferline#init(s:ext) call airline#extensions#bufferline#init(s:ext)
endif endif
@ -199,12 +199,12 @@ function! airline#extensions#load()
call airline#extensions#eclim#init(s:ext) call airline#extensions#eclim#init(s:ext)
endif endif
if (get(g:, 'airline#extensions#syntastic#enabled', 1) && get(g:, 'airline_enable_syntastic', 1)) if get(g:, 'airline#extensions#syntastic#enabled', 1)
\ && exists(':SyntasticCheck') \ && exists(':SyntasticCheck')
call airline#extensions#syntastic#init(s:ext) call airline#extensions#syntastic#init(s:ext)
endif endif
if (get(g:, 'airline#extensions#whitespace#enabled', 1) && get(g:, 'airline_detect_whitespace', 1)) if get(g:, 'airline#extensions#whitespace#enabled', 1)
call airline#extensions#whitespace#init(s:ext) call airline#extensions#whitespace#init(s:ext)
endif endif

View File

@ -105,8 +105,7 @@ endfunction
function! airline#extensions#branch#get_head() function! airline#extensions#branch#get_head()
let head = airline#extensions#branch#head() let head = airline#extensions#branch#head()
let empty_message = get(g:, 'airline#extensions#branch#empty_message', let empty_message = get(g:, 'airline#extensions#branch#empty_message', '')
\ get(g:, 'airline_branch_empty_message', ''))
let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch) let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch)
return empty(head) return empty(head)
\ ? empty_message \ ? empty_message

View File

@ -3,13 +3,7 @@
" http://got-ravings.blogspot.com/2008/10/vim-pr0n-statusline-whitespace-flags.html " http://got-ravings.blogspot.com/2008/10/vim-pr0n-statusline-whitespace-flags.html
" for backwards compatibility let s:show_message = get(g:, 'airline#extensions#whitespace#show_message', 1)
if exists('g:airline_detect_whitespace')
let s:show_message = g:airline_detect_whitespace == 1
else
let s:show_message = get(g:, 'airline#extensions#whitespace#show_message', 1)
endif
let s:symbol = get(g:, 'airline#extensions#whitespace#symbol', g:airline_symbols.whitespace) let s:symbol = get(g:, 'airline#extensions#whitespace#symbol', g:airline_symbols.whitespace)
let s:default_checks = ['indent', 'trailing'] let s:default_checks = ['indent', 'trailing']

View File

@ -56,11 +56,11 @@ function! airline#init#bootstrap()
call s:check_defined('g:airline_symbols', {}) call s:check_defined('g:airline_symbols', {})
call extend(g:airline_symbols, { call extend(g:airline_symbols, {
\ 'paste': get(g:, 'airline_paste_symbol', 'PASTE'), \ 'paste': 'PASTE',
\ 'readonly': get(g:, 'airline_readonly_symbol', get(g:, 'airline_powerline_fonts', 0) ? "\ue0a2" : 'RO'), \ 'readonly': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a2" : 'RO',
\ 'whitespace': get(g:, 'airline_powerline_fonts', 0) ? "\u2739" : '!', \ 'whitespace': get(g:, 'airline_powerline_fonts', 0) ? "\u2739" : '!',
\ 'linenr': get(g:, 'airline_linecolumn_prefix', get(g:, 'airline_powerline_fonts', 0) ? "\ue0a1" : ':' ), \ 'linenr': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a1" : ':',
\ 'branch': get(g:, 'airline_branch_prefix', get(g:, 'airline_powerline_fonts', 0) ? "\ue0a0" : ''), \ 'branch': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a0" : '',
\ 'modified': '+', \ 'modified': '+',
\ 'space': ' ', \ 'space': ' ',
\ 'crypt': get(g:, 'airline_crypt_symbol', nr2char(0x1F512)), \ 'crypt': get(g:, 'airline_crypt_symbol', nr2char(0x1F512)),