mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-16 07:23:49 -05:00
remove fugitive component
This commit is contained in:
381
README.md
381
README.md
@@ -86,199 +86,278 @@ MIT License
|
|||||||
## Configuration tutorial
|
## Configuration tutorial
|
||||||
In default, the statusline looks like:
|
In default, the statusline looks like:
|
||||||

|

|
||||||
If you want a wombat colorscheme, add the following setting to your .vimrc (or \_vimrc on Windows):
|
If you want a colorscheme which looks well with the wombat colorscheme, add the following setting to your .vimrc (or \_vimrc on Windows):
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'wombat',
|
\ 'colorscheme': 'wombat',
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||
to get:
|
to get:
|
||||||

|

|
||||||
|
|
||||||
If you have installed [vim-fugitive](https://github.com/tpope/vim-fugitive), the branch status is automatically available:
|
You may think that the default read-only mark is not so cool:
|
||||||

|

|
||||||
but you find it annoying! Then you add to your .vimrc:
|
Then edit the readonly component.
|
||||||
|
The lightline components are stored in `g:lightline.component`.
|
||||||
|
So you add the setting of `g:lightline.component.readonly` in your .vimrc. (the following setting is effective with the patched font for vim-powerline):
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'wombat',
|
\ 'colorscheme': 'wombat',
|
||||||
\ 'active': {
|
\ 'component': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'readonly': '%{&readonly?"⭤":""}',
|
||||||
\ [ 'readonly', 'filename', 'modified' ] ] }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
OK. The branch section has been removed.
|
|
||||||
The `g:lightline.active.left` stands for the components which appear on the left hand side, for the active window.
|
|
||||||
|
|
||||||
You think that the read-only mark is not so cool:
|
|
||||||

|
|
||||||
So you add the component setting (the following setting is effective with the patched font for vim-powerline):
|
|
||||||
```vim
|
|
||||||
let g:lightline = {
|
|
||||||
\ 'colorscheme': 'wombat',
|
|
||||||
\ 'active': {
|
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
|
||||||
\ [ 'readonly', 'filename', 'modified' ] ] },
|
|
||||||
\ 'component': {
|
|
||||||
\ 'readonly': '%{&readonly?"⭤":""}'
|
|
||||||
\ }
|
|
||||||
\ }
|
|
||||||
```
|
|
||||||

|
|
||||||
How nice!
|
How nice!
|
||||||
|
|
||||||
But the boundaries are quadrilateral. You may miss the powerline.
|
But the boundaries are quadrilateral. You may miss the powerline.
|
||||||
You have installed a cool font for powerlines, so you can use it.
|
You have installed a cool font for powerlines, so you can use it.
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'wombat',
|
\ 'colorscheme': 'wombat',
|
||||||
\ 'active': {
|
\ 'component': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'readonly': '%{&readonly?"⭤":""}',
|
||||||
\ [ 'readonly', 'filename', 'modified' ] ] },
|
\ },
|
||||||
\ 'component': {
|
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
||||||
\ 'readonly': '%{&readonly?"⭤":""}'
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
\ },
|
\ }
|
||||||
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
|
||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
|
||||||
\ }
|
|
||||||
```
|
```
|
||||||

|

|
||||||
Hurrah! Cool!
|
Hurrah! Cool!
|
||||||
|
|
||||||
|
|
||||||
Now, you look into a help file to find the marks annoying.
|
Now, you look into a help file to find the marks annoying.
|
||||||
Help files are read-only and no-modifiable? We know, of course!
|
Help files are read-only and no-modifiable? We know that!
|
||||||

|

|
||||||
OK, so you again edit your .vimrc.
|
OK, so you again edit your .vimrc.
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'wombat',
|
\ 'colorscheme': 'wombat',
|
||||||
\ 'active': {
|
\ 'component': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}',
|
||||||
\ [ 'readonly', 'filename', 'modified' ] ] },
|
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}'
|
||||||
\ 'component': {
|
\ },
|
||||||
\ 'readonly': '%{&filetype!="help"&& &readonly?"⭤":""}',
|
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
||||||
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}'
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
\ },
|
\ }
|
||||||
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
|
||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
|
||||||
\ }
|
|
||||||
```
|
```
|
||||||

|

|
||||||
Huh? Weird!
|
Huh? Weird!
|
||||||
The component does not collapse even if it has no information!
|
The component does not collapse even if it has no information!
|
||||||
In order to avoid this, you set expressions to component\_visible\_condition, which should become 1 only when the corresponding components have information.
|
In order to avoid this situation, you set expressions to component\_visible\_condition, which should become 1 only when the corresponding components have information.
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'wombat',
|
\ 'colorscheme': 'wombat',
|
||||||
\ 'active': {
|
\ 'component': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}',
|
||||||
\ [ 'readonly', 'filename', 'modified' ] ] },
|
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}'
|
||||||
\ 'component': {
|
\ },
|
||||||
\ 'readonly': '%{&filetype!="help"&& &readonly?"⭤":""}',
|
\ 'component_visible_condition': {
|
||||||
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}'
|
\ 'readonly': '(&filetype!="help"&& &readonly)',
|
||||||
\ },
|
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))'
|
||||||
\ 'component_visible_condition': {
|
\ },
|
||||||
\ 'readonly': '(&filetype!="help"&& &readonly)',
|
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
||||||
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))'
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
\ },
|
\ }
|
||||||
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
|
||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
|
||||||
\ }
|
|
||||||
```
|
```
|
||||||
|

|
||||||
|
Okay. It works nice.
|
||||||
|
|
||||||
|
|
||||||
|
How does lightline desides the components to show in the statusline?
|
||||||
|
It's very simple.
|
||||||
|
The variable to control the components is `g:lightline.active.left` and `g:lightline.active.left`.
|
||||||
|
For example, you add the `g:lightline.active.left` in .vimrc.
|
||||||
|
```vim
|
||||||
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'wombat',
|
||||||
|
\ 'active': {
|
||||||
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
|
\ [ 'readonly', 'filename', 'modified' ] ]
|
||||||
|
\ },
|
||||||
|
\ 'component': {
|
||||||
|
\ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}',
|
||||||
|
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}'
|
||||||
|
\ },
|
||||||
|
\ 'component_visible_condition': {
|
||||||
|
\ 'readonly': '(&filetype!="help"&& &readonly)',
|
||||||
|
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))'
|
||||||
|
\ },
|
||||||
|
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
||||||
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
|
\ }
|
||||||
|
```
|
||||||
|
The plugin arranges all the component:
|
||||||
|

|
||||||
|
The mode component, the paste component, read-only component, filename component and modified component in a row.
|
||||||
|
Normally, the paste component does not show up.
|
||||||

|

|
||||||
Okay. Works nice.
|
If the file is not read-only (more common case), the read-only component does not show up.
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
However, you may wonder we cannot gather these settings.
|
Again look into `g:lightline.active.left`.
|
||||||
Or, if you want to do something more complicated?
|
```vim
|
||||||
|
let g:lightline = {
|
||||||
|
\ 'active': {
|
||||||
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
|
\ [ 'readonly', 'filename', 'modified' ] ] ...
|
||||||
|
```
|
||||||
|
And the screen shot.
|
||||||
|

|
||||||
|
The mode and paste component are displayed in the same group.
|
||||||
|
And The read-only, filename and modified component are in the second group.
|
||||||
|
It corresponds to the structure of `g:lightline.active.left`.
|
||||||
|
|
||||||
|
|
||||||
|
GitHub branch is important for us.
|
||||||
|
And is a default component in powerline.
|
||||||
|
However, lightline does not provide the branch feature in default.
|
||||||
|
|
||||||
|
In order to show the branch in statusline, firstly you install the [vim-fugitive](https://github.com/tpope/vim-fugitive) plugin.
|
||||||
|
Then edit the g:lightline in your .vimrc.
|
||||||
|
+ Add fugitive component to `g:lightline.component`.
|
||||||
|
+ Add the condition when the fugitive component has information to `g:lightline.component_visible_condition`.
|
||||||
|
+ Add the component by inserting 'fugitive' to `g:lightline.active.left`.
|
||||||
|
```vim
|
||||||
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'wombat',
|
||||||
|
\ 'active': {
|
||||||
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
|
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
|
||||||
|
\ },
|
||||||
|
\ 'component': {
|
||||||
|
\ 'readonly': '%{&filetype=="help"?"":&readonly?"⭤":""}',
|
||||||
|
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
|
||||||
|
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'
|
||||||
|
\ },
|
||||||
|
\ 'component_visible_condition': {
|
||||||
|
\ 'readonly': '(&filetype!="help"&& &readonly)',
|
||||||
|
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
|
||||||
|
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'
|
||||||
|
\ },
|
||||||
|
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
||||||
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
|
\ }
|
||||||
|
```
|
||||||
|

|
||||||
|
Okay, the branch component is added!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Now, you might get tired of setting both `'component'` and `'component_visible_condition'`.
|
||||||
|
Or if you want to do something more complicated?
|
||||||
|
|
||||||
|
|
||||||
In fact, the components can be created using functions.
|
In fact, the components can be created using functions.
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'wombat',
|
\ 'colorscheme': 'wombat',
|
||||||
\ 'active': {
|
\ 'active': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
\ [ 'readonly', 'filename', 'modified' ] ] },
|
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
|
||||||
\ 'component_function': {
|
\ },
|
||||||
\ 'readonly': 'MyReadonly',
|
\ 'component_function': {
|
||||||
\ 'modified': 'MyModified'
|
\ 'fugitive': 'MyFugitive',
|
||||||
\ },
|
\ 'readonly': 'MyReadonly',
|
||||||
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
\ 'modified': 'MyModified'
|
||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
\ },
|
||||||
\ }
|
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
||||||
function! MyModified()
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
if &filetype == "help"
|
\ }
|
||||||
return ""
|
|
||||||
elseif &modified
|
function! MyModified()
|
||||||
return "+"
|
if &filetype == "help"
|
||||||
elseif &modifiable
|
return ""
|
||||||
return ""
|
elseif &modified
|
||||||
else
|
return "+"
|
||||||
return ""
|
elseif &modifiable
|
||||||
endif
|
return ""
|
||||||
endfunction
|
else
|
||||||
function! MyReadonly()
|
return ""
|
||||||
if &filetype == "help"
|
endif
|
||||||
return ""
|
endfunction
|
||||||
elseif &readonly
|
|
||||||
return "⭤"
|
function! MyReadonly()
|
||||||
else
|
if &filetype == "help"
|
||||||
return ""
|
return ""
|
||||||
endif
|
elseif &readonly
|
||||||
endfunction
|
return "⭤"
|
||||||
|
else
|
||||||
|
return ""
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! MyFugitive()
|
||||||
|
return exists('*fugitive#head') ? fugitive#head()
|
||||||
|
endfunction
|
||||||
```
|
```
|
||||||

|

|
||||||
Fine and readable!
|
Fine and readable!
|
||||||
|
|
||||||
|
|
||||||
Finally, you come up with concatenating the three components: the read-only mark, the filename and the modified mark.
|
Finally, you come up with concatenating the three components: the read-only mark, the filename and the modified mark.
|
||||||

|
|
||||||
Now you may know what to do.
|
Now you may know what to do.
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'wombat',
|
\ 'colorscheme': 'wombat',
|
||||||
\ 'active': {
|
\ 'active': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
\ [ 'filename' ] ] },
|
\ [ 'fugitive', 'filename' ] ]
|
||||||
\ 'component_function': {
|
\ },
|
||||||
\ 'filename': 'MyFilename',
|
\ 'component_function': {
|
||||||
\ 'readonly': 'MyReadonly',
|
\ 'fugitive': 'MyFugitive',
|
||||||
\ 'modified': 'MyModified'
|
\ 'readonly': 'MyReadonly',
|
||||||
\ },
|
\ 'modified': 'MyModified',
|
||||||
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
\ 'filename': 'MyFilename'
|
||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
\ },
|
||||||
\ }
|
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
||||||
function! MyModified()
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
if &filetype == "help"
|
\ }
|
||||||
return ""
|
|
||||||
elseif &modified
|
function! MyModified()
|
||||||
return "+"
|
if &filetype == "help"
|
||||||
elseif &modifiable
|
return ""
|
||||||
return ""
|
elseif &modified
|
||||||
else
|
return "+"
|
||||||
return ""
|
elseif &modifiable
|
||||||
endif
|
return ""
|
||||||
endfunction
|
else
|
||||||
function! MyReadonly()
|
return ""
|
||||||
if &filetype == "help"
|
endif
|
||||||
return ""
|
endfunction
|
||||||
elseif &readonly
|
|
||||||
return "⭤"
|
function! MyReadonly()
|
||||||
else
|
if &filetype == "help"
|
||||||
return ""
|
return ""
|
||||||
endif
|
elseif &readonly
|
||||||
endfunction
|
return "⭤"
|
||||||
function! MyFilename()
|
else
|
||||||
return ('' != MyReadonly() ? MyReadonly() . ' ' : '') .
|
return ""
|
||||||
\ ('' != expand('%t') ? expand('%t') : '[No Name]') .
|
endif
|
||||||
\ ('' != MyModified() ? ' ' . MyModified() : '')
|
endfunction
|
||||||
endfunction
|
|
||||||
|
function! MyFugitive()
|
||||||
|
return exists('*fugitive#head') ? fugitive#head() : ''
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! MyFilename()
|
||||||
|
return ('' != MyReadonly() ? MyReadonly() . ' ' : '') .
|
||||||
|
\ ('' != expand('%t') ? expand('%t') : '[No Name]') .
|
||||||
|
\ ('' != MyModified() ? ' ' . MyModified() : '')
|
||||||
|
endfunction
|
||||||
```
|
```
|
||||||
Define your own filename component. Your component has priority over the default component.
|
Define your own filename component. Your component has priority over the default component.
|
||||||

|

|
||||||
Looks nice.
|
Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline)
|
||||||
|
```vim
|
||||||
|
function! MyFugitive()
|
||||||
|
return exists('*fugitive#head') && len(fugitive#head()) ? '⭠ '.fugitive#head() : ''
|
||||||
|
endfunction
|
||||||
|
```
|
||||||
|

|
||||||
|
How cool!!!
|
||||||
|
|
||||||
Of course, you can name your component as you wish.
|
Of course, you can name your component as you wish.
|
||||||
```vim
|
```vim
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
" Version: 0.0
|
" Version: 0.0
|
||||||
" Author: itchyny
|
" Author: itchyny
|
||||||
" License: MIT License
|
" License: MIT License
|
||||||
" Last Change: 2013/08/23 13:36:31.
|
" Last Change: 2013/08/23 19:20:42.
|
||||||
" =============================================================================
|
" =============================================================================
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
@@ -30,7 +30,7 @@ function! lightline#init()
|
|||||||
let g:lightline = get(g:, 'lightline', {})
|
let g:lightline = get(g:, 'lightline', {})
|
||||||
let g:lightline.active = get(g:lightline, 'active', {})
|
let g:lightline.active = get(g:lightline, 'active', {})
|
||||||
call extend(g:lightline.active, {
|
call extend(g:lightline.active, {
|
||||||
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'readonly', 'filename', 'modified' ] ],
|
\ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'filename', 'modified' ] ],
|
||||||
\ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ] ] }, 'keep')
|
\ 'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ] ] }, 'keep')
|
||||||
let g:lightline.inactive = get(g:lightline, 'inactive', {})
|
let g:lightline.inactive = get(g:lightline, 'inactive', {})
|
||||||
call extend(g:lightline.inactive, {
|
call extend(g:lightline.inactive, {
|
||||||
@@ -58,14 +58,12 @@ function! lightline#init()
|
|||||||
\ 'fileformat': '%{&fileformat}',
|
\ 'fileformat': '%{&fileformat}',
|
||||||
\ 'filetype': '%{strlen(&filetype)?&filetype:"no ft"}',
|
\ 'filetype': '%{strlen(&filetype)?&filetype:"no ft"}',
|
||||||
\ 'percent': '%3p%%',
|
\ 'percent': '%3p%%',
|
||||||
\ 'lineinfo': '%3l:%-2v',
|
\ 'lineinfo': '%3l:%-2v' }, 'keep')
|
||||||
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' }, 'keep')
|
|
||||||
let g:lightline.component_visible_condition = get(g:lightline, 'component_visible_condition', {})
|
let g:lightline.component_visible_condition = get(g:lightline, 'component_visible_condition', {})
|
||||||
call extend(g:lightline.component_visible_condition, {
|
call extend(g:lightline.component_visible_condition, {
|
||||||
\ 'modified': '(&modified||!&modifiable)',
|
\ 'modified': '(&modified||!&modifiable)',
|
||||||
\ 'readonly': '(&readonly)',
|
\ 'readonly': '(&readonly)',
|
||||||
\ 'paste': '(&paste)',
|
\ 'paste': '(&paste)' }, 'keep')
|
||||||
\ 'fugitive': '(exists("*fugitive#head")&&strlen(fugitive#head()))' }, 'keep')
|
|
||||||
let g:lightline.component_function = get(g:lightline, 'component_function', {})
|
let g:lightline.component_function = get(g:lightline, 'component_function', {})
|
||||||
let g:lightline.separator = get(g:lightline, 'separator', {})
|
let g:lightline.separator = get(g:lightline, 'separator', {})
|
||||||
call extend(g:lightline.separator, { 'left': '', 'right': '' }, 'keep')
|
call extend(g:lightline.separator, { 'left': '', 'right': '' }, 'keep')
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Version: 0.0
|
|||||||
Author: itchyny (https://github.com/itchyny)
|
Author: itchyny (https://github.com/itchyny)
|
||||||
License: MIT License
|
License: MIT License
|
||||||
Repository: https://github.com/itchyny/lightline.vim
|
Repository: https://github.com/itchyny/lightline.vim
|
||||||
Last Change: 2013/08/23 07:11:18.
|
Last Change: 2013/08/23 19:20:57.
|
||||||
|
|
||||||
CONTENTS *lightline-contents*
|
CONTENTS *lightline-contents*
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ OPTIONS *lightline-options*
|
|||||||
>
|
>
|
||||||
let g:lightline.active = {
|
let g:lightline.active = {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ],
|
\ [ 'readonly', 'filename', 'modified' ] ],
|
||||||
\ 'right': [ [ 'lineinfo' ],
|
\ 'right': [ [ 'lineinfo' ],
|
||||||
\ [ 'percent' ],
|
\ [ 'percent' ],
|
||||||
\ [ 'fileformat', 'fileencoding', 'filetype' ] ] }
|
\ [ 'fileformat', 'fileencoding', 'filetype' ] ] }
|
||||||
@@ -57,8 +57,7 @@ OPTIONS *lightline-options*
|
|||||||
\ 'fileformat': '%{&fileformat}',
|
\ 'fileformat': '%{&fileformat}',
|
||||||
\ 'filetype': '%{strlen(&filetype)?&filetype:"no ft"}',
|
\ 'filetype': '%{strlen(&filetype)?&filetype:"no ft"}',
|
||||||
\ 'percent': '%3p%%',
|
\ 'percent': '%3p%%',
|
||||||
\ 'lineinfo': '%3l:%-2v',
|
\ 'lineinfo': '%3l:%-2v' }
|
||||||
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' }
|
|
||||||
<
|
<
|
||||||
g:lightline.component_visible_condition *g:lightline.component_visible_condition*
|
g:lightline.component_visible_condition *g:lightline.component_visible_condition*
|
||||||
Dictionary of boolean expressions for the components.
|
Dictionary of boolean expressions for the components.
|
||||||
|
|||||||
Reference in New Issue
Block a user