mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-13 22:13:50 -05:00
remove images from repository, move them into wiki
This commit is contained in:
80
README.md
80
README.md
@@ -4,48 +4,48 @@ A light and configurable statusline for Vim
|
|||||||
https://github.com/itchyny/lightline.vim
|
https://github.com/itchyny/lightline.vim
|
||||||
|
|
||||||
### powerline theme (default)
|
### powerline theme (default)
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
### wombat (with the patched font)
|
### wombat (with the patched font)
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
### jellybeans (with the patched font)
|
### jellybeans (with the patched font)
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
### solarized theme (dark)
|
### solarized theme (dark)
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
### solarized theme (light)
|
### solarized theme (light)
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
### landscape theme (with the patched font)
|
### landscape theme (with the patched font)
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
With branch name, read-only mark and modified mark.
|
With branch name, read-only mark and modified mark.
|
||||||

|

|
||||||
|
|
||||||
landscape is my colorscheme, which is a high-contrast cui-supported colorscheme, available at https://github.com/itchyny/landscape.vim
|
landscape is my colorscheme, which is a high-contrast cui-supported colorscheme, available at https://github.com/itchyny/landscape.vim
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ 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 wombat colorscheme, add the following setting to your .vimrc (or \_vimrc on Windows):
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
@@ -93,10 +93,10 @@ If you want a wombat colorscheme, add the following setting to your .vimrc (or \
|
|||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||
to get:
|
to get:
|
||||||

|

|
||||||
|
|
||||||
If you have installed [vim-fugitive](https://github.com/tpope/vim-fugitive), the branch status is automatically available:
|
If you have installed [vim-fugitive](https://github.com/tpope/vim-fugitive), the branch status is automatically available:
|
||||||

|

|
||||||
but you find it annoying! Then you add to your .vimrc:
|
but you find it annoying! Then you add to your .vimrc:
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
@@ -106,12 +106,12 @@ but you find it annoying! Then you add to your .vimrc:
|
|||||||
\ [ 'readonly', 'filename', 'modified' ] ] }
|
\ [ 'readonly', 'filename', 'modified' ] ] }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
OK. The branch section has been removed.
|
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.
|
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:
|
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):
|
So you add the component setting (the following setting is effective with the patched font for vim-powerline):
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
@@ -124,7 +124,7 @@ So you add the component setting (the following setting is effective with the pa
|
|||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
How nice!
|
How nice!
|
||||||
|
|
||||||
But the boundaries are quadrilateral. You may miss the powerline.
|
But the boundaries are quadrilateral. You may miss the powerline.
|
||||||
@@ -142,13 +142,13 @@ You have installed a cool font for powerlines, so you can use it.
|
|||||||
\ 'subseparator': { '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, of course!
|
||||||

|

|
||||||
OK, so you again edit your .vimrc.
|
OK, so you again edit your .vimrc.
|
||||||
```vim
|
```vim
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
@@ -164,7 +164,7 @@ OK, so you again edit your .vimrc.
|
|||||||
\ 'subseparator': { '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, you set expressions to component\_visible\_condition, which should become 1 only when the corresponding components have information.
|
||||||
@@ -186,7 +186,7 @@ In order to avoid this, you set expressions to component\_visible\_condition, wh
|
|||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
Okay. Works nice.
|
Okay. Works nice.
|
||||||
|
|
||||||
|
|
||||||
@@ -229,12 +229,12 @@ In fact, the components can be created using functions.
|
|||||||
endif
|
endif
|
||||||
endfunction
|
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 = {
|
||||||
@@ -277,7 +277,7 @@ Now you may know what to do.
|
|||||||
endfunction
|
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.
|
Looks nice.
|
||||||
|
|
||||||
Of course, you can name your component as you wish.
|
Of course, you can name your component as you wish.
|
||||||
@@ -348,9 +348,9 @@ When the window width is too narrow, the mode component and the file information
|
|||||||
For example, the gundo buffer is narrow.
|
For example, the gundo buffer is narrow.
|
||||||
|
|
||||||
Before:
|
Before:
|
||||||

|

|
||||||
|
|
||||||
After:
|
After:
|
||||||

|

|
||||||
|
|
||||||
Nice looking, isn't it?
|
Nice looking, isn't it?
|
||||||
|
|||||||
Reference in New Issue
Block a user