From ec7d944f06821f96461fc0ba81aebf1dc650cded Mon Sep 17 00:00:00 2001 From: itchyny Date: Fri, 15 Apr 2016 22:30:25 +0900 Subject: [PATCH] update the default components: fileencoding and filetype --- autoload/lightline.vim | 6 +++--- doc/lightline.txt | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index 17a5d1f..d3f240c 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2016/04/15 00:51:48. +" Last Change: 2016/04/15 22:24:06. " ============================================================================= let s:save_cpo = &cpo @@ -104,8 +104,8 @@ let s:_lightline = { \ 'absolutepath': '%F', 'relativepath': '%f', 'filename': '%t', 'modified': '%M', 'bufnum': '%n', \ 'spell': '%{&spell?&spelllang:"no spell"}', \ 'paste': '%{&paste?"PASTE":""}', 'readonly': '%R', 'charvalue': '%b', 'charvaluehex': '%B', - \ 'fileencoding': '%{strlen(&fenc)?&fenc:&enc}', 'fileformat': '%{&fileformat}', - \ 'filetype': '%{strlen(&filetype)?&filetype:"no ft"}', 'percent': '%3p%%', 'percentwin': '%P', + \ 'fileencoding': '%{&fenc!=#""?&fenc:&enc}', 'fileformat': '%{&ff}', + \ 'filetype': '%{&ft!=#""?&ft:"no ft"}', 'percent': '%3p%%', 'percentwin': '%P', \ 'lineinfo': '%3l:%-2v', 'line': '%l', 'column': '%c', 'close': '%999X X ' \ }, \ 'component_visible_condition': { diff --git a/doc/lightline.txt b/doc/lightline.txt index a5dc391..2b2e500 100644 --- a/doc/lightline.txt +++ b/doc/lightline.txt @@ -4,7 +4,7 @@ Version: 0.0 Author: itchyny (https://github.com/itchyny) License: MIT License Repository: https://github.com/itchyny/lightline.vim -Last Change: 2016/04/15 22:14:01. +Last Change: 2016/04/15 22:26:52. CONTENTS *lightline-contents* @@ -104,9 +104,9 @@ OPTIONS *lightline-option* \ 'readonly': '%R', \ 'charvalue': '%b', \ 'charvaluehex': '%B', - \ 'fileencoding': '%{strlen(&fenc)?&fenc:&enc}', - \ 'fileformat': '%{&fileformat}', - \ 'filetype': '%{strlen(&filetype)?&filetype:"no ft"}', + \ 'fileencoding': '%{&fenc!=#""?&fenc:&enc}', + \ 'fileformat': '%{&ff}', + \ 'filetype': '%{&ft!=#""?&ft:"no ft"}', \ 'percent': '%3p%%', \ 'percentwin': '%P', \ 'spell': '%{&spell?&spelllang:"no spell"}',