mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-18 00:13:42 -05:00
update doc: add document for component_function_visible_condition, improve document for component_visible_condition (ref #173)
This commit is contained in:
10
README.md
10
README.md
@@ -272,7 +272,7 @@ set noshowmode
|
||||
```
|
||||
|
||||
|
||||
Now, let us get back to the tutorial (with the patched font for vim-powerline).
|
||||
Now, let's get back to the tutorial (with the patched font for vim-powerline).
|
||||
You look into a help file to find the marks annoying.
|
||||
|
||||

|
||||
@@ -293,8 +293,8 @@ let g:lightline = {
|
||||

|
||||
|
||||
Huh? Weird!
|
||||
The components do not collapse even if they have no information!
|
||||
In order to avoid this situation, you set expressions to `g:lightline.component_visible_condition`, which should become 1 only when the corresponding components have information.
|
||||
The subseparators are visible even if the components are empty.
|
||||
In order to hide the subseparators, you can set expressions to `g:lightline.component_visible_condition`, which should be 1 only when the corresponding component is not empty.
|
||||
```vim
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'wombat',
|
||||
@@ -313,8 +313,8 @@ let g:lightline = {
|
||||

|
||||
|
||||
Okay. It works nice.
|
||||
|
||||
|
||||
The configuration `component_visible_condition` is used to control the visibility of the subseparators.
|
||||
You cannot use this variable to control the visibility of the components themselves.
|
||||
|
||||
How does lightline decide the components to show in the statusline?
|
||||
It's very simple.
|
||||
|
||||
Reference in New Issue
Block a user