mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-17 07:53:41 -05:00
add some components
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
" Version: 0.0
|
||||
" Author: itchyny
|
||||
" License: MIT License
|
||||
" Last Change: 2013/08/27 20:51:53.
|
||||
" Last Change: 2013/08/27 21:55:49.
|
||||
" =============================================================================
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
@@ -48,20 +48,14 @@ function! lightline#init()
|
||||
let s:lightline.component = get(s:lightline, 'component', {})
|
||||
call extend(s:lightline.component, {
|
||||
\ 'mode': '%{lightline#mode()}',
|
||||
\ 'filename': '%t',
|
||||
\ 'modified': '%M',
|
||||
\ 'paste': '%{&paste?"PASTE":""}',
|
||||
\ 'readonly': '%R',
|
||||
\ 'fileencoding': '%{strlen(&fenc)?&fenc:&enc}',
|
||||
\ 'fileformat': '%{&fileformat}',
|
||||
\ 'filetype': '%{strlen(&filetype)?&filetype:"no ft"}',
|
||||
\ 'percent': '%3p%%',
|
||||
\ 'lineinfo': '%3l:%-2v' }, 'keep')
|
||||
\ 'fullpath': '%F', 'relativepath': '%f', 'filename': '%t', 'modified': '%M', 'bufnum': '%n',
|
||||
\ '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',
|
||||
\ 'lineinfo': '%3l:%-2v', 'line': '%l', 'column': '%c' }, 'keep')
|
||||
let s:lightline.component_visible_condition = get(s:lightline, 'component_visible_condition', {})
|
||||
call extend(s:lightline.component_visible_condition, {
|
||||
\ 'modified': '&modified||!&modifiable',
|
||||
\ 'readonly': '&readonly',
|
||||
\ 'paste': '&paste' }, 'keep')
|
||||
\ 'modified': '&modified||!&modifiable', 'readonly': '&readonly', 'paste': '&paste' }, 'keep')
|
||||
let s:lightline.component_function = get(s:lightline, 'component_function', {})
|
||||
let s:lightline.separator = get(s:lightline, 'separator', {})
|
||||
call extend(s:lightline.separator, { 'left': '', 'right': '' }, 'keep')
|
||||
|
||||
@@ -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: 2013/08/27 20:45:27.
|
||||
Last Change: 2013/08/27 21:57:06.
|
||||
|
||||
CONTENTS *lightline-contents*
|
||||
|
||||
@@ -73,15 +73,23 @@ OPTIONS *lightline-option*
|
||||
>
|
||||
let g:lightline.component = {
|
||||
\ 'mode': '%{lightline#mode()}',
|
||||
\ 'fullpath': '%F',
|
||||
\ 'relativepath': '%f',
|
||||
\ 'filename': '%t',
|
||||
\ 'modified': '%M',
|
||||
\ 'bufnum': '%n',
|
||||
\ 'paste': '%{&paste?"PASTE":""}',
|
||||
\ 'readonly': '%R',
|
||||
\ 'charvalue': '%b',
|
||||
\ 'charvaluehex': '%B',
|
||||
\ 'fileencoding': '%{strlen(&fenc)?&fenc:&enc}',
|
||||
\ 'fileformat': '%{&fileformat}',
|
||||
\ 'filetype': '%{strlen(&filetype)?&filetype:"no ft"}',
|
||||
\ 'percent': '%3p%%',
|
||||
\ 'lineinfo': '%3l:%-2v' }
|
||||
\ 'percentwin': '%P',
|
||||
\ 'lineinfo': '%3l:%-2v',
|
||||
\ 'line': '%l',
|
||||
\ 'column': '%c' }
|
||||
<
|
||||
g:lightline.component_visible_condition *g:lightline.component_visible_condition*
|
||||
Dictionary of boolean expressions for the components.
|
||||
|
||||
Reference in New Issue
Block a user