mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins. Switched to Ack as standard search tool (much better than grep/vimgrep)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:has_fugitive = exists('*fugitive#head')
|
||||
@ -10,10 +10,6 @@ if !s:has_fugitive && !s:has_lawrencium && !s:has_vcscommand
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:empty_message = get(g:, 'airline#extensions#branch#empty_message',
|
||||
\ get(g:, 'airline_branch_empty_message', ''))
|
||||
let s:symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch)
|
||||
|
||||
function! airline#extensions#branch#head()
|
||||
let head = ''
|
||||
|
||||
@ -48,9 +44,12 @@ endfunction
|
||||
|
||||
function! airline#extensions#branch#get_head()
|
||||
let head = airline#extensions#branch#head()
|
||||
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)
|
||||
return empty(head)
|
||||
\ ? s:empty_message
|
||||
\ : printf('%s%s', empty(s:symbol) ? '' : s:symbol.(g:airline_symbols.space), head)
|
||||
\ ? empty_message
|
||||
\ : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head)
|
||||
endfunction
|
||||
|
||||
function! s:check_in_path()
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !exists('*bufferline#get_status_string')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !get(g:, 'command_t_loaded', 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !get(g:, 'loaded_csv', 0) && !exists(':Table')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !get(g:, 'loaded_ctrlp', 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:section_truncate_width = get(g:, 'airline#extensions#default#section_truncate_width', {
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !exists(':ProjectCreate')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
" we don't actually want this loaded :P
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !get(g:, 'loaded_signify', 0) && !get(g:, 'loaded_gitgutter', 0)
|
||||
|
@ -0,0 +1,32 @@
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !exists(':NetrwSettings')
|
||||
finish
|
||||
endif
|
||||
|
||||
function! airline#extensions#netrw#apply(...)
|
||||
if &ft == 'netrw'
|
||||
let spc = g:airline_symbols.space
|
||||
|
||||
call a:1.add_section('airline_a', spc.'netrw'.spc)
|
||||
if exists('*airline#extensions#branch#get_head')
|
||||
call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc)
|
||||
endif
|
||||
call a:1.add_section('airline_c', spc.'%f'.spc)
|
||||
call a:1.split()
|
||||
call a:1.add_section('airline_y', spc.'%{airline#extensions#netrw#sortstring()}'.spc)
|
||||
return 1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#netrw#init(ext)
|
||||
let g:netrw_force_overwrite_statusline = 0
|
||||
call a:ext.add_statusline_func('airline#extensions#netrw#apply')
|
||||
endfunction
|
||||
|
||||
|
||||
function! airline#extensions#netrw#sortstring()
|
||||
let order = (g:netrw_sort_direction =~ 'n') ? '+' : '-'
|
||||
return g:netrw_sort_by . (g:airline_symbols.space) . '[' . order . ']'
|
||||
endfunction
|
@ -0,0 +1,33 @@
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !exists(':PromptlineSnapshot')
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('airline#extensions#promptline#snapshot_file') || !len('airline#extensions#promptline#snapshot_file')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:prompt_snapshot_file = get(g:, 'airline#extensions#promptline#snapshot_file', '')
|
||||
let s:color_template = get(g:, 'airline#extensions#promptline#color_template', 'normal')
|
||||
|
||||
function! airline#extensions#promptline#init(ext)
|
||||
call a:ext.add_theme_func('airline#extensions#promptline#set_prompt_colors')
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#promptline#set_prompt_colors(palette)
|
||||
let color_template = has_key(a:palette, s:color_template) ? s:color_template : 'normal'
|
||||
let mode_palette = a:palette[color_template]
|
||||
|
||||
if !has_key(g:, 'promptline_symbols')
|
||||
let g:promptline_symbols = {
|
||||
\ 'left' : g:airline_left_sep,
|
||||
\ 'right' : g:airline_right_sep,
|
||||
\ 'left_alt' : g:airline_left_alt_sep,
|
||||
\ 'right_alt' : g:airline_right_alt_sep}
|
||||
endif
|
||||
|
||||
let promptline_theme = promptline#api#create_theme_from_airline(mode_palette)
|
||||
call promptline#api#create_snapshot_with_theme(s:prompt_snapshot_file, promptline_theme)
|
||||
endfunction
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let g:airline#extensions#quickfix#quickfix_text = 'Quickfix'
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !exists(':SyntasticCheck')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
function! airline#extensions#tabline#unique_tail#format(bufnr, buffers)
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:skip_symbol = '…'
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !exists(':TagbarToggle')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !exists(':Tmuxline')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !exists(':UndotreeToggle')
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !get(g:, 'loaded_unite', 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
if !get(g:, 'virtualenv_loaded', 0)
|
||||
|
@ -1,4 +1,4 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" MIT License. Copyright (c) 2013-2014 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
" http://got-ravings.blogspot.com/2008/10/vim-pr0n-statusline-whitespace-flags.html
|
||||
|
Reference in New Issue
Block a user