Merge pull request #1136 from chrisbra/pr1103
add total line next to line number
This commit is contained in:
commit
9dfc4d0c04
|
@ -63,6 +63,7 @@ function! airline#init#bootstrap()
|
||||||
\ 'readonly': 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_powerline_fonts', 0) ? "\ue0a1" : ':',
|
\ 'linenr': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a1" : ':',
|
||||||
|
\ 'maxlinenr': get(g:, 'airline_powerline_fonts', 0) ? "\u2630" : '',
|
||||||
\ 'branch': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a0" : '',
|
\ 'branch': get(g:, 'airline_powerline_fonts', 0) ? "\ue0a0" : '',
|
||||||
\ 'notexists': "\u2204",
|
\ 'notexists': "\u2204",
|
||||||
\ 'modified': '+',
|
\ 'modified': '+',
|
||||||
|
@ -88,6 +89,9 @@ function! airline#init#bootstrap()
|
||||||
call airline#parts#define('linenr', {
|
call airline#parts#define('linenr', {
|
||||||
\ 'raw': '%{g:airline_symbols.linenr}%#__accent_bold#%4l%#__restore__#',
|
\ 'raw': '%{g:airline_symbols.linenr}%#__accent_bold#%4l%#__restore__#',
|
||||||
\ 'accent': 'bold'})
|
\ 'accent': 'bold'})
|
||||||
|
call airline#parts#define('maxlinenr', {
|
||||||
|
\ 'raw': '%#__accent_bold#/%L%{g:airline_symbols.maxlinenr}%#__restore__#',
|
||||||
|
\ 'accent': 'bold'})
|
||||||
call airline#parts#define_function('ffenc', 'airline#parts#ffenc')
|
call airline#parts#define_function('ffenc', 'airline#parts#ffenc')
|
||||||
call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic',
|
call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic',
|
||||||
\ 'eclim', 'whitespace','windowswap', 'ycm_error_count', 'ycm_warning_count'])
|
\ 'eclim', 'whitespace','windowswap', 'ycm_error_count', 'ycm_warning_count'])
|
||||||
|
@ -127,7 +131,7 @@ function! airline#init#sections()
|
||||||
let g:airline_section_y = airline#section#create_right(['ffenc'])
|
let g:airline_section_y = airline#section#create_right(['ffenc'])
|
||||||
endif
|
endif
|
||||||
if !exists('g:airline_section_z')
|
if !exists('g:airline_section_z')
|
||||||
let g:airline_section_z = airline#section#create(['windowswap', '%3p%%'.spc, 'linenr', ':%3v '])
|
let g:airline_section_z = airline#section#create(['windowswap', '%3p%%'.spc, 'linenr', 'maxlinenr', spc.':%3v'])
|
||||||
endif
|
endif
|
||||||
if !exists('g:airline_section_error')
|
if !exists('g:airline_section_error')
|
||||||
let g:airline_section_error = airline#section#create(['ycm_error_count', 'syntastic', 'eclim'])
|
let g:airline_section_error = airline#section#create(['ycm_error_count', 'syntastic', 'eclim'])
|
||||||
|
|
Loading…
Reference in New Issue