mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-13 14:03:51 -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
|
||||
|
||||
### powerline theme (default)
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

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

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

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

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

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

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

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

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

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

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
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
|
||||
|
||||
@@ -85,7 +85,7 @@ MIT License
|
||||
|
||||
## Configuration tutorial
|
||||
In default, the statusline looks like:
|
||||

|
||||

|
||||
If you want a wombat colorscheme, add the following setting to your .vimrc (or \_vimrc on Windows):
|
||||
```vim
|
||||
let g:lightline = {
|
||||
@@ -93,10 +93,10 @@ If you want a wombat colorscheme, add the following setting to your .vimrc (or \
|
||||
\ }
|
||||
```
|
||||
to get:
|
||||

|
||||

|
||||
|
||||
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:
|
||||
```vim
|
||||
let g:lightline = {
|
||||
@@ -106,12 +106,12 @@ but you find it annoying! Then you add to your .vimrc:
|
||||
\ [ '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 = {
|
||||
@@ -124,7 +124,7 @@ So you add the component setting (the following setting is effective with the pa
|
||||
\ }
|
||||
\ }
|
||||
```
|
||||

|
||||

|
||||
How nice!
|
||||
|
||||
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': '⮃' }
|
||||
\ }
|
||||
```
|
||||

|
||||

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

|
||||

|
||||
OK, so you again edit your .vimrc.
|
||||
```vim
|
||||
let g:lightline = {
|
||||
@@ -164,7 +164,7 @@ OK, so you again edit your .vimrc.
|
||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||
\ }
|
||||
```
|
||||

|
||||

|
||||
Huh? Weird!
|
||||
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.
|
||||
@@ -186,7 +186,7 @@ In order to avoid this, you set expressions to component\_visible\_condition, wh
|
||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||
\ }
|
||||
```
|
||||

|
||||

|
||||
Okay. Works nice.
|
||||
|
||||
|
||||
@@ -229,12 +229,12 @@ In fact, the components can be created using functions.
|
||||
endif
|
||||
endfunction
|
||||
```
|
||||

|
||||

|
||||
Fine and readable!
|
||||
|
||||
|
||||
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.
|
||||
```vim
|
||||
let g:lightline = {
|
||||
@@ -277,7 +277,7 @@ Now you may know what to do.
|
||||
endfunction
|
||||
```
|
||||
Define your own filename component. Your component has priority over the default component.
|
||||

|
||||

|
||||
Looks nice.
|
||||
|
||||
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.
|
||||
|
||||
Before:
|
||||

|
||||

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

|
||||

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