mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-14 06:23:51 -05:00
improve README: %s/raw.github.com/raw.githubusercontent.com/g
This commit is contained in:
100
README.md
100
README.md
@@ -5,49 +5,49 @@ 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
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ This software is released under the MIT License, see LICENSE.
|
|||||||
|
|
||||||
## Configuration tutorial
|
## Configuration tutorial
|
||||||
By default, the statusline looks like:
|
By default, the statusline looks like:
|
||||||

|

|
||||||
|
|
||||||
If you use the wombat colorscheme, add the following settings to your `.vimrc` (or \_vimrc on Windows):
|
If you use the wombat colorscheme, add the following settings to your `.vimrc` (or \_vimrc on Windows):
|
||||||
```vim
|
```vim
|
||||||
@@ -101,11 +101,11 @@ let g:lightline = {
|
|||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||
to get:
|
to get:
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
If your statusline looks like
|
If your statusline looks like
|
||||||

|

|
||||||
|
|
||||||
and the cool statuslines appear only on `:vsp`, add
|
and the cool statuslines appear only on `:vsp`, add
|
||||||
```vim
|
```vim
|
||||||
@@ -115,7 +115,7 @@ to your `.vimrc`.
|
|||||||
|
|
||||||
|
|
||||||
If you have problem like
|
If you have problem like
|
||||||

|

|
||||||
|
|
||||||
then add
|
then add
|
||||||
```sh
|
```sh
|
||||||
@@ -137,7 +137,7 @@ Colors appear correctly? Now let's see how to change the appearance.
|
|||||||
|
|
||||||
|
|
||||||
You may think that the default read-only mark is not so cool:
|
You may think that the default read-only mark is not so cool:
|
||||||

|

|
||||||
|
|
||||||
Then edit the read-only component.
|
Then edit the read-only component.
|
||||||
The lightline components are stored in `g:lightline.component`.
|
The lightline components are stored in `g:lightline.component`.
|
||||||
@@ -150,7 +150,7 @@ let g:lightline = {
|
|||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
How nice!
|
How nice!
|
||||||
|
|
||||||
@@ -166,13 +166,13 @@ let g:lightline = {
|
|||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
Hurrah! Cool!
|
Hurrah! Cool!
|
||||||
|
|
||||||
|
|
||||||
If your statusline looks like:
|
If your statusline looks like:
|
||||||

|

|
||||||
|
|
||||||
the patched font is not installed.
|
the patched font is not installed.
|
||||||
|
|
||||||
@@ -198,10 +198,10 @@ let g:lightline = {
|
|||||||
\ 'subseparator': { 'left': '', 'right': '' }
|
\ 'subseparator': { 'left': '', 'right': '' }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
If you have installed the font for powerline and your statusline looks like
|
If you have installed the font for powerline and your statusline looks like
|
||||||

|

|
||||||
|
|
||||||
remove
|
remove
|
||||||
```vim
|
```vim
|
||||||
@@ -222,7 +222,7 @@ let g:lightline = {
|
|||||||
\ 'subseparator': { 'left': '|', 'right': '|' }
|
\ 'subseparator': { 'left': '|', 'right': '|' }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ For vim-powerline font users:
|
|||||||
|
|
||||||
|
|
||||||
Almost all of things go well with the patched font but if the triangle looks weird:
|
Almost all of things go well with the patched font but if the triangle looks weird:
|
||||||

|

|
||||||
|
|
||||||
If you are using iTerm2, change the following settings of iTerm2:
|
If you are using iTerm2, change the following settings of iTerm2:
|
||||||
+ set `Profiles>Colors>Minimum contrast` to the Lowest.
|
+ set `Profiles>Colors>Minimum contrast` to the Lowest.
|
||||||
@@ -258,7 +258,7 @@ For other terminals, this weird-triangle problem will be resolved by disabling t
|
|||||||
|
|
||||||
Now, let us get back to the tutorial (with the patched font for vim-powerline).
|
Now, let us get back to the tutorial (with the patched font for vim-powerline).
|
||||||
You look into a help file to find the marks annoying.
|
You look into a help file to find the marks annoying.
|
||||||

|

|
||||||
|
|
||||||
Help files are read-only and no-modifiable? We know that!
|
Help files are read-only and no-modifiable? We know that!
|
||||||
OK, so you again edit the components.
|
OK, so you again edit the components.
|
||||||
@@ -273,7 +273,7 @@ let g:lightline = {
|
|||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
Huh? Weird!
|
Huh? Weird!
|
||||||
The components do not collapse even if they have no information!
|
The components do not collapse even if they have no information!
|
||||||
@@ -293,7 +293,7 @@ let g:lightline = {
|
|||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
Okay. It works nice.
|
Okay. It works nice.
|
||||||
|
|
||||||
@@ -323,14 +323,14 @@ let g:lightline = {
|
|||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||
If the plugin arranges all the components (in a situation you `set paste` and the file `.vimrc` is read-only, try to modify):
|
If the plugin arranges all the components (in a situation you `set paste` and the file `.vimrc` is read-only, try to modify):
|
||||||

|

|
||||||
|
|
||||||
The mode component, the paste component, read-only component, filename component and modified component in a row.
|
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.
|
Normally, the paste component does not show up.
|
||||||

|

|
||||||
|
|
||||||
If the file is not read-only (more common cases), the read-only component does not show up.
|
If the file is not read-only (more common cases), the read-only component does not show up.
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
Again look into `g:lightline.active.left`.
|
Again look into `g:lightline.active.left`.
|
||||||
@@ -341,7 +341,7 @@ let g:lightline = {
|
|||||||
\ [ 'readonly', 'filename', 'modified' ] ] ...
|
\ [ 'readonly', 'filename', 'modified' ] ] ...
|
||||||
```
|
```
|
||||||
And the screen shot of all the components.
|
And the screen shot of all the components.
|
||||||

|

|
||||||
|
|
||||||
The mode and paste component are displayed in the same group.
|
The mode and paste component are displayed in the same group.
|
||||||
The read-only, filename and modified component are in the second group.
|
The read-only, filename and modified component are in the second group.
|
||||||
@@ -387,7 +387,7 @@ let g:lightline = {
|
|||||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||||
\ }
|
\ }
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
Okay, the branch component is added!
|
Okay, the branch component is added!
|
||||||
|
|
||||||
@@ -441,7 +441,7 @@ function! MyFugitive()
|
|||||||
return exists('*fugitive#head') ? fugitive#head() : ''
|
return exists('*fugitive#head') ? fugitive#head() : ''
|
||||||
endfunction
|
endfunction
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
Fine and readable!
|
Fine and readable!
|
||||||
|
|
||||||
@@ -497,7 +497,7 @@ function! MyFilename()
|
|||||||
\ ('' != MyModified() ? ' ' . MyModified() : '')
|
\ ('' != MyModified() ? ' ' . MyModified() : '')
|
||||||
endfunction
|
endfunction
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline)
|
Oops! We forgot the cool mark for the branch component! (work with the patched font for vim-powerline)
|
||||||
```vim
|
```vim
|
||||||
@@ -509,7 +509,7 @@ function! MyFugitive()
|
|||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
How cool!!!
|
How cool!!!
|
||||||
|
|
||||||
@@ -593,10 +593,10 @@ When the current window width is narrow, the mode component and the file informa
|
|||||||
For example, the [gundo](https://github.com/sjl/gundo.vim) buffer is narrow.
|
For example, the [gundo](https://github.com/sjl/gundo.vim) buffer is narrow.
|
||||||
|
|
||||||
Before:
|
Before:
|
||||||

|

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

|

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