From 85c1f5ad03ac52fe50ef607751e20a22fb594f43 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Tue, 27 Aug 2013 18:08:50 +0000 Subject: [PATCH] rename fragments to parts. --- autoload/airline/{fragments.vim => parts.vim} | 6 +++--- plugin/airline.vim | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) rename autoload/airline/{fragments.vim => parts.vim} (77%) diff --git a/autoload/airline/fragments.vim b/autoload/airline/parts.vim similarity index 77% rename from autoload/airline/fragments.vim rename to autoload/airline/parts.vim index f3ef5d40..0c7ece9d 100644 --- a/autoload/airline/fragments.vim +++ b/autoload/airline/parts.vim @@ -1,18 +1,18 @@ " MIT License. Copyright (c) 2013 Bailey Ling. " vim: et ts=2 sts=2 sw=2 -function! airline#fragments#paste() +function! airline#parts#paste() return g:airline_detect_paste && &paste ? ' '.g:airline_symbols.paste : '' endfunction -function! airline#fragments#iminsert() +function! airline#parts#iminsert() if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name') return ' '.g:airline_left_alt_sep.' '.toupper(b:keymap_name) endif return '' endfunction -function! airline#fragments#readonly() +function! airline#parts#readonly() return &readonly ? g:airline_symbols.readonly : '' endfunction diff --git a/plugin/airline.vim b/plugin/airline.vim index 17c86bd4..92736231 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -37,12 +37,12 @@ call extend(g:airline_symbols, { \ 'branch': get(g:, 'airline_branch_prefix', get(g:, 'airline_powerline_fonts', 0) ? '' : ''), \ }, 'keep') -call s:check_defined('g:airline_fragments', {}) -call extend(g:airline_fragments, { +call s:check_defined('g:airline_parts', {}) +call extend(g:airline_parts, { \ 'mode': '%{get(w:,"airline_current_mode","")}', - \ 'iminsert': '%{airline#fragments#iminsert()}', - \ 'paste': '%{airline#fragments#paste()}', - \ 'readonly': '%{airline#fragments#readonly()}', + \ 'iminsert': '%{airline#parts#iminsert()}', + \ 'paste': '%{airline#parts#paste()}', + \ 'readonly': '%#airline_file#%{airline#parts#readonly()}', \ }, 'keep') call s:check_defined('g:airline_mode_map', {}) @@ -68,10 +68,10 @@ call extend(g:airline_theme_map, { \ '.*solarized.*': 'solarized', \ }, 'keep') -call s:check_defined('g:airline_section_a', (g:airline_fragments.mode).(g:airline_fragments.paste).(g:airline_fragments.iminsert)) +call s:check_defined('g:airline_section_a', (g:airline_parts.mode).(g:airline_parts.paste).(g:airline_parts.iminsert)) call s:check_defined('g:airline_section_b', '') call s:check_defined('g:airline_section_c', '%f%m') -call s:check_defined('g:airline_section_gutter', '%#airline_file#'.(g:airline_fragments.readonly).'%=') +call s:check_defined('g:airline_section_gutter', ' '.(g:airline_parts.readonly).'%=') call s:check_defined('g:airline_section_x', "%{strlen(&filetype)>0?&filetype:''}") call s:check_defined('g:airline_section_y', "%{strlen(&fenc)>0?&fenc:''}%{strlen(&ff)>0?'['.&ff.']':''}") call s:check_defined('g:airline_section_z', '%3p%% %{g:airline_symbols.linenr} %3l:%3c')