1
0
mirror of https://github.com/amix/vimrc synced 2025-07-14 15:34:59 +08:00

Track new files from updated packages

This commit is contained in:
Isaac Andrade
2016-02-17 12:03:42 -07:00
parent 6ac337eccd
commit 5a56192fd3
16 changed files with 756 additions and 0 deletions

View File

@ -0,0 +1,104 @@
# Change Log
This is the Changelog for the vim-airline project.
## [Unreleased]
- Changes
- Themes have been moved into an extra repository [vim-airline-themes](https://github.com/vim-airline/vim-airline-themes)
- Many new themes
- Airline Moved to new [repository](https://github.com/vim-airline/vim-airline)
- New features
- Integration with [taboo](https://github.com/gcmt/taboo.vim), [vim-ctrlspace](https://github.com/szw/vim-ctrlspace),
[quickfixsigns](https://github.com/tomtom/quickfixsigns_vim), [YouCompleteMe](https://github.com/Valloric/YouCompleteMe)
- Support for Neovim
- Added wordcount extension
- Adding Crypt and Byte Order Mark Indicator
## [0.7] - 2014-12-10
- New features
- accents support; allowing multiple colors/styles in the same section
- extensions: eclim
- themes: understated, monochrome, murmur, sol, lucius
- Improvements
- solarized theme; support for 8 color terminals
- tabline resizes dynamically based on number of open buffers
- miscellaneous bug fixes
## [0.6] - 2013-10-08
- New features
- accents support; allowing multiple colors/styles in the same section
- extensions: eclim
- themes: understated, monochrome, murmur, sol, lucius
- Improvements
- solarized theme; support for 8 color terminals
- tabline resizes dynamically based on number of open buffers
- miscellaneous bug fixes
## [0.5] - 2013-09-13
- New features
- smart tabline extension which displays all buffers when only one tab is visible
- automatic section truncation when the window resizes
- support for a declarative style of configuration, allowing parts to contain metadata such as minimum window width or conditional visibility
- themes: zenburn, serene
- Other
- a sizable chunk of vim-airline is now running through a unit testing suite, automated via Travis CI
## [0.4] - 2013-08-26
- New features
- integration with csv.vim and vim-virtualenv
- hunks extension for vim-gitgutter and vim-signify
- automatic theme switching with matching colorschemes
- commands: AirlineToggle
- themes: base16 (all variants)
- Improvements
- integration with undotree, tagbar, and unite
- Other
- refactored core and exposed statusline builder and pipeline
- all extension related g:airline_variables have been deprecated in favor of g:airline#extensions# variables
- extensions found in the runtimepath outside of the default distribution will be automatically loaded
## [0.3] - 2013-08-12
- New features
- first-class integration with tagbar
- white space detection for trailing spaces and mixed indentation
- introduced warning section for syntastic and white space detection
- improved ctrlp integration: colors are automatically selected based on the current airline theme
- new themes: molokai, bubblegum, jellybeans, tomorrow
- Bug fixes
- improved handling of eventignore used by other plugins
- Other
- code cleaned up for clearer separation between core functionality and extensions
- introduced color extraction from highlight groups, allowing themes to be generated off of the active colorscheme (e.g. jellybeans and tomorrow)
- License changed to MIT
## [0.2] - 2013-07-28
- New features
- iminsert detection
- integration with vimshell, vimfiler, commandt, lawrencium
- enhanced bufferline theming
- support for ctrlp theming
- support for custom window excludes
- New themes
- luna and wombat
- Bug fixes
- refresh branch name after switching with a shell command
## [0.1] - 2013-07-17
- Initial release
- integration with other plugins: netrw, unite, nerdtree, undotree, gundo, tagbar, minibufexplr, ctrlp
- support for themes: 8 included
[Unreleased]: https://github.com/vim-airline/vim-airline/compare/v0.7...HEAD
[0.7]: https://github.com/vim-airline/vim-airline/compare/v0.6...v0.7
[0.6]: https://github.com/vim-airline/vim-airline/compare/v0.5...v0.6
[0.5]: https://github.com/vim-airline/vim-airline/compare/v0.4...v0.5
[0.4]: https://github.com/vim-airline/vim-airline/compare/v0.3...v0.4
[0.3]: https://github.com/vim-airline/vim-airline/compare/v0.2...v0.3
[0.2]: https://github.com/vim-airline/vim-airline/compare/v0.1...v0.2
[0.1]: https://github.com/vim-airline/vim-airline/releases/tag/v0.1

View File

@ -0,0 +1,32 @@
# Contributions
Contributions and pull requests are welcome. Please take note of the following guidelines:
* Adhere to the existing style as much as possible; notably, 2 space indents and long-form keywords.
* Keep the history clean! Squash your branches before you submit a pull request. `pull --rebase` is your friend.
* Any changes to the core should be tested against Vim 7.2.
# Bugs
Tracking down bugs can take a very long time due to different configurations, versions, and operating systems. To ensure a timely response, please help me out by doing the following:
* Reproduce it with this [minivimrc][7] repository to rule out any configuration conflicts. Even better, create a `gist` of your vimrc that is compatible with [pathogen][11].
* And to make it easier to reproduce, please supply the following:
* the `:version` of vim
* the commit of vim-airline you're using
* the OS that you're using, including terminal emulator, GUI vs non-GUI
# Themes
* If you submit a theme, please create a screenshot so it can be added to the [Wiki][14].
* In the majority of cases, modifications to colors of existing themes will likely be rejected. Themes are a subjective thing, so while you may prefer that a particular color be darker, another user will prefer it to be lighter, or something entirely different. The more popular the theme, the more unlikely the change will be accepted. However, it's pretty simple to create your own theme; copy the theme to `~/.vim/autoload/airline/themes` under a new name with your modifications, and it can be used.
# Maintenance
If you would like to take a more active role in improving vim-airline, please consider [becoming a maintainer][43].
[7]: https://github.com/bling/minivimrc
[11]: https://github.com/tpope/vim-pathogen
[14]: https://github.com/vim-airline/vim-airline/wiki/Screenshots
[43]: https://github.com/vim-airline/vim-airline/wiki/Becoming-a-Maintainer

View File

@ -0,0 +1,97 @@
" MIT License. Copyright (c) 2016 Kevin Sapper
" vim: et ts=2 sts=2 sw=2
scriptencoding utf-8
let s:current_bufnr = -1
let s:current_tabnr = -1
let s:current_tabline = ''
function! airline#extensions#tabline#ctrlspace#off()
augroup airline_tabline_ctrlspace
autocmd!
augroup END
endfunction
function! airline#extensions#tabline#ctrlspace#on()
augroup airline_tabline_ctrlspace
autocmd!
autocmd BufDelete * call airline#extensions#tabline#ctrlspace#invalidate()
augroup END
endfunction
function! airline#extensions#tabline#ctrlspace#invalidate()
let s:current_bufnr = -1
let s:current_tabnr = -1
endfunction
function! airline#extensions#tabline#ctrlspace#get()
let cur_buf = bufnr('%')
let s:tab_list = ctrlspace#api#TabList()
for tab in s:tab_list
if tab.current
let cur_tab = tab.index
endif
endfor
if cur_buf == s:current_bufnr && cur_tab == s:current_tabnr
return s:current_tabline
endif
let b = airline#extensions#tabline#new_builder()
call b.add_section_spaced('airline_tabtype', 'buffers')
let s:buffer_list = ctrlspace#api#BufferList(cur_tab)
for buffer in s:buffer_list
if cur_buf == buffer.index
if buffer.modified
let group = 'airline_tabmod'
else
let group = 'airline_tabsel'
endif
else
if buffer.modified
let group = 'airline_tabmod_unsel'
elseif buffer.visible
let group = 'airline_tab'
else
let group = 'airline_tabhid'
endif
endif
let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.index.')}%)'
call b.add_section_spaced(group, buf_name)
endfor
call b.add_section('airline_tabfill', '')
call b.split()
call b.add_section('airline_tabfill', '')
for tab in s:tab_list
if tab.current
if tab.modified
let group = 'airline_tabmod_right'
else
let group = 'airline_tabsel_right'
endif
else
if tab.modified
let group = 'airline_tabmod_unsel_right'
else
let group = 'airline_tabhid_right'
endif
endif
call b.add_section_spaced(group, tab.title.ctrlspace#api#TabBuffersNumber(tab.index))
endfor
call b.add_section_spaced('airline_tabtype', 'tabs')
let s:current_bufnr = cur_buf
let s:current_tabnr = cur_tab
let s:current_tabline = b.build()
return s:current_tabline
endfunction

View File

@ -0,0 +1,22 @@
" MIT License. Copyright (c) 2013-2016 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
if !get(g:, 'loaded_unicodePlugin', 0)
finish
endif
function! airline#extensions#unicode#apply(...)
if exists(":UnicodeTable") == 2 && bufname('') ==# 'UnicodeTable'
call airline#parts#define('unicode', {
\ 'text': '[UnicodeTable]',
\ 'accent': 'bold' })
let w:airline_section_a = airline#section#create(['unicode'])
let w:airline_section_b = ''
let w:airline_section_c = ''
let w:airline_section_y = ''
endif
endfunction
function! airline#extensions#unicode#init(ext)
call a:ext.add_statusline_func('airline#extensions#unicode#apply')
endfunction

View File

@ -0,0 +1,58 @@
" MIT License. Copyright (c) 2013-2016 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
function! airline#extensions#wordcount#formatters#default#format()
let words = string(s:wordcount())
if empty(words)
return
endif
let separator = s:get_decimal_group()
if words > 999 && !empty(separator)
" Format number according to locale, e.g. German: 1.245 or English: 1,245
let a = join(reverse(split(words, '.\zs')),'')
let a = substitute(a, '...', '&'.separator, 'g')
let words = join(reverse(split(a, '.\zs')),'')
endif
return words . " words" . g:airline_symbols.space . g:airline_right_alt_sep . g:airline_symbols.space
endfunction
function! s:wordcount()
if exists("*wordcount")
let l:mode = mode()
if l:mode ==# 'v' || l:mode ==# 'V' || l:mode ==# 's' || l:mode ==# 'S'
let l:visual_words = wordcount()['visual_words']
if l:visual_words != ''
return l:visual_words
else
return 0
endif
else
return wordcount()['words']
endif
elseif mode() =~? 's'
return
else
let old_status = v:statusmsg
let position = getpos(".")
exe "silent normal! g\<c-g>"
let stat = v:statusmsg
call setpos('.', position)
let v:statusmsg = old_status
let parts = split(stat)
if len(parts) > 11
return str2nr(parts[11])
else
return
endif
endif
endfunction
function s:get_decimal_group()
if match(v:lang, '\v\cC|en') > -1
return ','
elseif match(v:lang, '\v\cde|dk|fr|pt') > -1
return '.'
endif
return ''
endfunction

View File

@ -0,0 +1,36 @@
" MIT License. Copyright (c) 2015 Evgeny Firsov.
" vim: et ts=2 sts=2 sw=2
let s:spc = g:airline_symbols.space
let s:error_symbol = get(g:, 'airline#extensions#ycm#error_symbol', 'E:')
let s:warning_symbol = get(g:, 'airline#extensions#ycm#warning_symbol', 'W:')
function! airline#extensions#ycm#init(ext)
call airline#parts#define_function('ycm_error_count', 'airline#extensions#ycm#get_error_count')
call airline#parts#define_function('ycm_warning_count', 'airline#extensions#ycm#get_warning_count')
endfunction
function! airline#extensions#ycm#get_error_count()
if exists(':YcmDiag')
let cnt = youcompleteme#GetErrorCount()
if cnt != 0
return s:error_symbol.cnt
endif
endif
return ''
endfunction
function! airline#extensions#ycm#get_warning_count()
if exists(':YcmDiag')
let cnt = youcompleteme#GetWarningCount()
if cnt != 0
return s:warning_symbol.cnt.s:spc
endif
endif
return ''
endfunction

View File

@ -0,0 +1,57 @@
" MIT License. Copyright (c) 2013-2016 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
" basic 16 msdos from MSDOS
" see output of color, should be
" 0 Black
" 1 DarkBlue
" 2 DarkGreen
" 3 DarkCyan
" 4 DarkRed
" 5 DarkMagenta
" 6 Brown
" 7 LightGray
" 8 DarkGray
" 9 Blue
" 10 Green
" 11 Cyan
" 12 Red
" 13 Magenta
" 14 Yellow
" 15 White
let s:basic16 = [
\ [ 0x00, 0x00, 0x00 ],
\ [ 0x00, 0x00, 0x80 ],
\ [ 0x00, 0x80, 0x00 ],
\ [ 0x00, 0x80, 0x80 ],
\ [ 0x80, 0x00, 0x00 ],
\ [ 0x80, 0x00, 0x80 ],
\ [ 0x80, 0x80, 0x00 ],
\ [ 0xC0, 0xC0, 0xC0 ],
\ [ 0x80, 0x80, 0x80 ],
\ [ 0x00, 0x00, 0xFF ],
\ [ 0x00, 0xFF, 0x00 ],
\ [ 0x00, 0xFF, 0xFF ],
\ [ 0xFF, 0x00, 0x00 ],
\ [ 0xFF, 0x00, 0xFF ],
\ [ 0xFF, 0xFF, 0x00 ],
\ [ 0xFF, 0xFF, 0xFF ]
\ ]
function! airline#msdos#round_msdos_colors(rgblist)
" Check for values from MSDOS 16 color terminal
let best = []
let min = 100000
let list = s:basic16
for value in list
let t = abs(value[0] - a:rgblist[0]) +
\ abs(value[1] - a:rgblist[1]) +
\ abs(value[2] - a:rgblist[2])
if min > t
let min = t
let best = value
endif
endfor
return index(s:basic16, best)
endfunction