Merge pull request #2374 from ReubenM/master

Section-Z symbols and layout
This commit is contained in:
Christian Brabandt 2021-05-03 08:09:38 +02:00 committed by GitHub
commit 76c24d2126
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,12 +86,13 @@ function! airline#init#bootstrap()
call s:check_defined('g:airline_left_alt_sep', "\ue0b1") " 
call s:check_defined('g:airline_right_sep', "\ue0b2") " 
call s:check_defined('g:airline_right_alt_sep', "\ue0b3") " 
" ro=, ws=☲, lnr=☰, mlnr=, br=, nx=Ɇ, crypt=🔒, dirty=⚡
" ro=, ws=☲, lnr=, mlnr=☰, colnr=, br=, nx=Ɇ, crypt=🔒, dirty=⚡
call extend(g:airline_symbols, {
\ 'readonly': "\ue0a2",
\ 'whitespace': "\u2632",
\ 'linenr': "\u2630 ",
\ 'maxlinenr': " \ue0a1",
\ 'maxlinenr': "\u2630",
\ 'linenr': "\ue0a1",
\ 'colnr': "\ue0a3",
\ 'branch': "\ue0a0",
\ 'notexists': "\u0246",
\ 'dirty': "\u26a1",
@ -103,12 +104,13 @@ function! airline#init#bootstrap()
call s:check_defined('g:airline_left_alt_sep', "")
call s:check_defined('g:airline_right_sep', "")
call s:check_defined('g:airline_right_alt_sep', "")
" ro=⊝, ws=☲, lnr=☰, mlnr=㏑, br=ᚠ, nx=Ɇ, crypt=🔒
" ro=⊝, ws=☲, lnr=㏑, mlnr=☰, colnr=㏇, br=ᚠ, nx=Ɇ, crypt=🔒
call extend(g:airline_symbols, {
\ 'readonly': "\u229D",
\ 'whitespace': "\u2632",
\ 'linenr': "\u2630 ",
\ 'maxlinenr': " \u33D1",
\ 'maxlinenr': "\u2630",
\ 'linenr': "\u33d1",
\ 'colnr': "\u33c7",
\ 'branch': "\u16A0",
\ 'notexists': "\u0246",
\ 'crypt': nr2char(0x1F512),
@ -123,8 +125,9 @@ function! airline#init#bootstrap()
call extend(g:airline_symbols, {
\ 'readonly': 'RO',
\ 'whitespace': '!',
\ 'linenr': 'ln ',
\ 'maxlinenr': ' :',
\ 'linenr': 'ln',
\ 'maxlinenr': '',
\ 'colnr': 'cn',
\ 'branch': '',
\ 'notexists': '?',
\ 'crypt': 'cr',
@ -152,10 +155,13 @@ function! airline#init#bootstrap()
endif
call airline#parts#define_raw('path', '%F%m')
call airline#parts#define('linenr', {
\ 'raw': '%{g:airline_symbols.linenr}%l',
\ 'raw': '%{g:airline_symbols.linenr}:%l',
\ 'accent': 'bold'})
call airline#parts#define('maxlinenr', {
\ 'raw': '/%L%{g:airline_symbols.maxlinenr}',
\ 'raw': '/%L%{g:airline_symbols.maxlinenr} ',
\ 'accent': 'bold'})
call airline#parts#define('colnr', {
\ 'raw': ' %{g:airline_symbols.colnr}:%v',
\ 'accent': 'bold'})
call airline#parts#define_function('ffenc', 'airline#parts#ffenc')
call airline#parts#define('hunks', {
@ -226,9 +232,9 @@ function! airline#init#sections()
endif
if !exists('g:airline_section_z')
if airline#util#winwidth() > 79
let g:airline_section_z = airline#section#create(['windowswap', 'obsession', '%p%%'.spc, 'linenr', 'maxlinenr', ':%v'])
let g:airline_section_z = airline#section#create(['windowswap', 'obsession', '%p%%'.spc, 'linenr', 'maxlinenr', 'colnr'])
else
let g:airline_section_z = airline#section#create(['%p%%'.spc, 'linenr', ':%v'])
let g:airline_section_z = airline#section#create(['%p%%'.spc, 'linenr', 'colnr'])
endif
endif
if !exists('g:airline_section_error')