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

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### 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
|
||||
|
||||
@@ -92,7 +92,7 @@ This software is released under the MIT License, see LICENSE.
|
||||
|
||||
## Configuration tutorial
|
||||
By default, the statusline looks like:
|
||||

|
||||

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

|
||||

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

|
||||

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

|
||||

|
||||
|
||||
then add
|
||||
```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:
|
||||

|
||||

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

|
||||

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

|
||||

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

|
||||

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

|
||||

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

|
||||

|
||||
|
||||
remove
|
||||
```vim
|
||||
@@ -222,7 +222,7 @@ let g:lightline = {
|
||||
\ '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:
|
||||

|
||||

|
||||
|
||||
If you are using iTerm2, change the following settings of iTerm2:
|
||||
+ 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).
|
||||
You look into a help file to find the marks annoying.
|
||||

|
||||

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

|
||||

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

|
||||

|
||||
|
||||
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):
|
||||

|
||||

|
||||
|
||||
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.
|
||||

|
||||

|
||||
|
||||
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`.
|
||||
@@ -341,7 +341,7 @@ let g:lightline = {
|
||||
\ [ 'readonly', 'filename', 'modified' ] ] ...
|
||||
```
|
||||
And the screen shot of all the components.
|
||||

|
||||

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

|
||||

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

|
||||

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

|
||||

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

|
||||

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

|
||||

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

|
||||

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