1
0
mirror of https://github.com/amix/vimrc synced 2025-07-01 12:45:00 +08:00

Updated plugins. Switched to Ack as standard search tool (much better than grep/vimgrep)

This commit is contained in:
amix
2014-02-07 10:41:15 +00:00
parent e62adb8084
commit 8265dca5d5
76 changed files with 3855 additions and 143 deletions

View File

@ -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:prototype = {}

View File

@ -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#debug#profile1()

View File

@ -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#deprecation#check()

View File

@ -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:ext = {}
@ -20,7 +20,6 @@ endfunction
let s:script_path = tolower(resolve(expand('<sfile>:p:h')))
let s:filetype_overrides = {
\ 'netrw': [ 'netrw', '%f' ],
\ 'nerdtree': [ 'NERD', '' ],
\ 'gundo': [ 'Gundo', '' ],
\ 'diff': [ 'diff', '' ],
@ -128,6 +127,10 @@ function! airline#extensions#load()
call airline#extensions#unite#init(s:ext)
endif
if exists(':NetrwSettings')
call airline#extensions#netrw#init(s:ext)
endif
if get(g:, 'loaded_vimfiler', 0)
let g:vimfiler_force_overwrite_statusline = 0
endif
@ -199,6 +202,10 @@ function! airline#extensions#load()
call airline#extensions#tmuxline#init(s:ext)
endif
if get(g:, 'airline#extensions#promptline#enabled', 1) && exists(':PromptlineSnapshot') && len(get(g:, 'airline#extensions#promptline#snapshot_file', ''))
call airline#extensions#promptline#init(s:ext)
endif
" load all other extensions not part of the default distribution
for file in split(globpath(&rtp, "autoload/airline/extensions/*.vim"), "\n")
" we have to check both resolved and unresolved paths, since it's possible

View File

@ -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()

View File

@ -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')

View File

@ -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)

View File

@ -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')

View File

@ -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)

View File

@ -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', {

View File

@ -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')

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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')

View File

@ -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')

View File

@ -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', ':~:.')

View File

@ -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)

View File

@ -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 = '…'

View File

@ -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')

View File

@ -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')

View File

@ -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')

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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:is_win32term = (has('win32') || has('win64')) && !has('gui_running')

View File

@ -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! s:check_defined(variable, default)

View File

@ -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:parts = {}

View File

@ -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
call airline#init#bootstrap()

View File

@ -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
" generates a dictionary which defines the colors for each highlight group

View File

@ -0,0 +1,57 @@
"
" Colorscheme: Kalisi for airline. Inspired by powerline.
" 06.02.2014 Arthur Jaron
" hifreeo@gmail.com
"
" Insert mode
let s:I1 = [ '#ffffff' , '#e80000' , 23 , 231 ]
let s:I2 = [ '#c5c5c5' , '#901010' , 74 , 31 ]
let s:I3 = [ '#c5c5c5' , '#500000' , 117 , 24 ]
" Visual mode
let s:V1 = [ '#005f5f' , '#ffffff' , 23 , 231 ]
let s:V2 = [ '#5fafd7' , '#0087af' , 74 , 31 ]
let s:V3 = [ '#87d7ff' , '#005f87' , 117 , 24 ]
" Replace mode
let s:R1 = [ '#8e00da' , '#ffffff' , 23 , 231 ]
let s:R2 = [ '#8e00da' , '#ce99ff' , 74 , 31 ]
let s:R3 = [ '#ce99ff' , '#8e00da' , 117 , 24 ]
let g:airline#themes#kalisi#palette = {}
function! airline#themes#kalisi#refresh()
" Normal mode
let s:N1 = [ '#005f00' , '#afd700' , 22 , 148 ]
let s:N2 = [ '#afd700' , '#005f00' , 247 , 236 ]
let s:N3 = airline#themes#get_highlight('StatusLine')
" Tabline Plugin
let g:airline#themes#kalisi#palette.tabline = {
\ 'airline_tab': ['#A6DB29', '#005f00', 231, 29, ''],
\ 'airline_tabsel': ['#404042', '#A6DB29', 231, 36, ''],
\ 'airline_tabtype': ['#afd700', '#005f00', 231, 36, ''],
\ 'airline_tabfill': ['#ffffff', '#000000', 231, 23, ''],
\ 'airline_tabhid': ['#c5c5c5', '#404042', 231, 88, ''],
\ 'airline_tabmod': ['#ffffff', '#F1266F', 231, 88, ''],
\ }
let g:airline#themes#kalisi#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#kalisi#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#kalisi#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#kalisi#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
" Inactive Mode
" let s:IA = [ '#c5c5c5' , '#505052' , 239 , 234 , '' ]
let s:IA = airline#themes#get_highlight('StatusLineNC')
let g:airline#themes#kalisi#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
let g:airline#themes#kalisi#palette.inactive_modified = {
\ 'statusline': [ '#F1266F' , '' , '53' , '' , '' ] ,
\ }
endfunction
call airline#themes#kalisi#refresh()

View File

@ -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
call airline#init#bootstrap()