mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-24 22:45:12 +02:00
parent
7fc376a4d5
commit
41c5f54507
@ -136,6 +136,7 @@ function! airline#init#bootstrap()
|
|||||||
\ 'notexists': "\u0246",
|
\ 'notexists': "\u0246",
|
||||||
\ 'dirty': "\u26a1",
|
\ 'dirty': "\u26a1",
|
||||||
\ 'crypt': nr2char(0x1F512),
|
\ 'crypt': nr2char(0x1F512),
|
||||||
|
\ 'executable': "\u2699",
|
||||||
\ }, 'keep')
|
\ }, 'keep')
|
||||||
" Note: If "\u2046" (Ɇ) does not show up, try to use "\u2204" (∄)
|
" Note: If "\u2046" (Ɇ) does not show up, try to use "\u2204" (∄)
|
||||||
if exists("*setcellwidths")
|
if exists("*setcellwidths")
|
||||||
@ -160,6 +161,7 @@ function! airline#init#bootstrap()
|
|||||||
\ 'notexists': "\u0246",
|
\ 'notexists': "\u0246",
|
||||||
\ 'crypt': nr2char(0x1F512),
|
\ 'crypt': nr2char(0x1F512),
|
||||||
\ 'dirty': '!',
|
\ 'dirty': '!',
|
||||||
|
\ 'executable': "\u2699",
|
||||||
\ }, 'keep')
|
\ }, 'keep')
|
||||||
else
|
else
|
||||||
" Symbols for ASCII terminals
|
" Symbols for ASCII terminals
|
||||||
@ -177,6 +179,7 @@ function! airline#init#bootstrap()
|
|||||||
\ 'notexists': '?',
|
\ 'notexists': '?',
|
||||||
\ 'crypt': 'cr',
|
\ 'crypt': 'cr',
|
||||||
\ 'dirty': '!',
|
\ 'dirty': '!',
|
||||||
|
\ 'executable': 'x',
|
||||||
\ }, 'keep')
|
\ }, 'keep')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -189,6 +192,7 @@ function! airline#init#bootstrap()
|
|||||||
call airline#parts#define_function('crypt', 'airline#parts#crypt')
|
call airline#parts#define_function('crypt', 'airline#parts#crypt')
|
||||||
call airline#parts#define_function('spell', 'airline#parts#spell')
|
call airline#parts#define_function('spell', 'airline#parts#spell')
|
||||||
call airline#parts#define_function('filetype', 'airline#parts#filetype')
|
call airline#parts#define_function('filetype', 'airline#parts#filetype')
|
||||||
|
call airline#parts#define_function('executable', 'airline#parts#executable')
|
||||||
call airline#parts#define('readonly', {
|
call airline#parts#define('readonly', {
|
||||||
\ 'function': 'airline#parts#readonly',
|
\ 'function': 'airline#parts#readonly',
|
||||||
\ 'accent': 'red',
|
\ 'accent': 'red',
|
||||||
@ -253,7 +257,7 @@ endfunction
|
|||||||
function! airline#init#sections()
|
function! airline#init#sections()
|
||||||
let spc = g:airline_symbols.space
|
let spc = g:airline_symbols.space
|
||||||
if !exists('g:airline_section_a')
|
if !exists('g:airline_section_a')
|
||||||
let g:airline_section_a = airline#section#create_left(['mode', 'crypt', 'paste', 'keymap', 'spell', 'capslock', 'xkblayout', 'iminsert'])
|
let g:airline_section_a = airline#section#create_left(['mode', 'crypt', 'paste', 'keymap', 'spell', 'capslock', 'xkblayout', 'iminsert', 'executable'])
|
||||||
endif
|
endif
|
||||||
if !exists('g:airline_section_b')
|
if !exists('g:airline_section_b')
|
||||||
if airline#util#winwidth() > 99
|
if airline#util#winwidth() > 99
|
||||||
|
@ -206,3 +206,11 @@ function! airline#parts#ffenc()
|
|||||||
return &fenc.bomb.noeolf.ff
|
return &fenc.bomb.noeolf.ff
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! airline#parts#executable()
|
||||||
|
if exists("*getfperm") && getfperm(bufname('%')) =~ 'x'
|
||||||
|
return g:airline_symbols.executable
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
@ -374,6 +374,7 @@ its contents. >
|
|||||||
let g:airline_symbols.colnr = ' ㏇:'
|
let g:airline_symbols.colnr = ' ㏇:'
|
||||||
let g:airline_symbols.colnr = ' ℅:'
|
let g:airline_symbols.colnr = ' ℅:'
|
||||||
let g:airline_symbols.crypt = '🔒'
|
let g:airline_symbols.crypt = '🔒'
|
||||||
|
let g:airline_symbols.executable = '⚙'
|
||||||
let g:airline_symbols.linenr = '☰'
|
let g:airline_symbols.linenr = '☰'
|
||||||
let g:airline_symbols.linenr = ' ␊:'
|
let g:airline_symbols.linenr = ' ␊:'
|
||||||
let g:airline_symbols.linenr = ' :'
|
let g:airline_symbols.linenr = ' :'
|
||||||
@ -427,7 +428,7 @@ window.
|
|||||||
>
|
>
|
||||||
variable names default contents
|
variable names default contents
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
let g:airline_section_a (mode, crypt, paste, spell, iminsert)
|
let g:airline_section_a (mode, crypt, paste, spell, iminsert, executable)
|
||||||
let g:airline_section_b (hunks, branch)[*]
|
let g:airline_section_b (hunks, branch)[*]
|
||||||
let g:airline_section_c (bufferline or filename, readonly)
|
let g:airline_section_c (bufferline or filename, readonly)
|
||||||
let g:airline_section_gutter (csv)
|
let g:airline_section_gutter (csv)
|
||||||
@ -1918,6 +1919,7 @@ The following list of parts are predefined by vim-airline.
|
|||||||
* `iminsert` displays the current insert method
|
* `iminsert` displays the current insert method
|
||||||
* `paste` displays the paste indicator
|
* `paste` displays the paste indicator
|
||||||
* `crypt` displays the crypted indicator
|
* `crypt` displays the crypted indicator
|
||||||
|
* `exectuable` displays the executable indicator
|
||||||
* `spell` displays the spell indicator
|
* `spell` displays the spell indicator
|
||||||
* `filetype` displays the file type
|
* `filetype` displays the file type
|
||||||
* `readonly` displays the read only indicator
|
* `readonly` displays the read only indicator
|
||||||
|
Loading…
x
Reference in New Issue
Block a user