mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
@@ -32,27 +32,63 @@ function! airline#init#bootstrap()
|
||||
call s:check_defined('g:airline_exclude_filetypes', [])
|
||||
call s:check_defined('g:airline_exclude_preview', 0)
|
||||
|
||||
" If g:airline_mode_map_codes is set to 1 in your .vimrc it will display
|
||||
" only the modes' codes in the status line. Refer :help mode() for codes.
|
||||
" That may be a preferred presentation because it is minimalistic.
|
||||
call s:check_defined('g:airline_mode_map_codes', 0)
|
||||
call s:check_defined('g:airline_mode_map', {})
|
||||
call extend(g:airline_mode_map, {
|
||||
|
||||
if g:airline_mode_map_codes != 1
|
||||
" If you prefer different mode names than those below they can be
|
||||
" customised by inclusion in your .vimrc - for example, including just:
|
||||
" let g:airline_mode_map = {
|
||||
" \ 'Rv' : 'VIRTUAL REPLACE',
|
||||
" \ 'niV' : 'VIRTUAL REPLACE (NORMAL)',
|
||||
" \ }
|
||||
" ...would override 'Rv' and 'niV' below respectively.
|
||||
call extend(g:airline_mode_map, {
|
||||
\ '__' : '------',
|
||||
\ 'c' : 'COMMAND',
|
||||
\ 'i' : 'INSERT',
|
||||
\ 'ic' : 'INSERT COMPL',
|
||||
\ 'ix' : 'INSERT COMPL',
|
||||
\ 'multi' : 'MULTI',
|
||||
\ 'n' : 'NORMAL',
|
||||
\ 'ni' : '(INSERT)',
|
||||
\ 'n' : 'NORMAL',
|
||||
\ 'no' : 'OP PENDING',
|
||||
\ 'R' : 'REPLACE',
|
||||
\ 'Rv' : 'V REPLACE',
|
||||
\ 's' : 'SELECT',
|
||||
\ 'S' : 'S-LINE',
|
||||
\ '' : 'S-BLOCK',
|
||||
\ 't' : 'TERMINAL',
|
||||
\ 'v' : 'VISUAL',
|
||||
\ 'V' : 'V-LINE',
|
||||
\ 'nov' : 'OP PENDING CHAR',
|
||||
\ 'noV' : 'OP PENDING LINE',
|
||||
\ 'no' : 'OP PENDING BLOCK',
|
||||
\ 'niI' : 'INSERT (NORMAL)',
|
||||
\ 'niR' : 'REPLACE (NORMAL)',
|
||||
\ 'niV' : 'V REPLACE (NORMAL)',
|
||||
\ 'v' : 'VISUAL',
|
||||
\ 'V' : 'V-LINE',
|
||||
\ '' : 'V-BLOCK',
|
||||
\ }, 'keep')
|
||||
\ 's' : 'SELECT',
|
||||
\ 'S' : 'S-LINE',
|
||||
\ '' : 'S-BLOCK',
|
||||
\ 'i' : 'INSERT',
|
||||
\ 'ic' : 'INSERT COMPL GENERIC',
|
||||
\ 'ix' : 'INSERT COMPL',
|
||||
\ 'R' : 'REPLACE',
|
||||
\ 'Rc' : 'REPLACE COMP GENERIC',
|
||||
\ 'Rv' : 'V REPLACE',
|
||||
\ 'Rx' : 'REPLACE COMP',
|
||||
\ 'c' : 'COMMAND',
|
||||
\ 'cv' : 'VIM EX',
|
||||
\ 'ce' : 'EX',
|
||||
\ 'r' : 'PROMPT',
|
||||
\ 'rm' : 'MORE PROMPT',
|
||||
\ 'r?' : 'CONFIRM',
|
||||
\ '!' : 'SHELL',
|
||||
\ 't' : 'TERMINAL',
|
||||
\ 'multi' : 'MULTI',
|
||||
\ }, 'keep')
|
||||
" NB: no*, cv, ce, r? and ! do not actually display
|
||||
else
|
||||
" Exception: The control character in ^S and ^V modes' codes
|
||||
" break the status line if allowed to render 'naturally' so
|
||||
" they are overridden with ^ (when g:airline_mode_map_codes = 1)
|
||||
call extend(g:airline_mode_map, {
|
||||
\ '' : '^V',
|
||||
\ '' : '^S',
|
||||
\ }, 'keep')
|
||||
endif
|
||||
|
||||
call s:check_defined('g:airline_theme_map', {})
|
||||
call extend(g:airline_theme_map, {
|
||||
|
||||
Reference in New Issue
Block a user