mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-13 05:53:51 -05:00
improve doc (ref #35)
This commit is contained in:
18
README.md
18
README.md
@@ -226,6 +226,24 @@ let g:lightline = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If the triangles do not appear (but you get some spaces or weird characters like <bf> or ¿), firstly try adding
|
||||||
|
```vim
|
||||||
|
scriptencoding utf-8
|
||||||
|
```
|
||||||
|
to the head of your `.vimrc`.
|
||||||
|
Still you have weird characters, use the unicode numbers. For powerline font
|
||||||
|
users:
|
||||||
|
```vim
|
||||||
|
\ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
|
||||||
|
\ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
|
||||||
|
```
|
||||||
|
For vim-powerline font users:
|
||||||
|
```vim
|
||||||
|
\ 'separator': { 'left': "\u2b80", 'right': "\u2b82" },
|
||||||
|
\ 'subseparator': { 'left': "\u2b81", 'right': "\u2b83" }
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
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:
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
" Version: 0.0
|
" Version: 0.0
|
||||||
" Author: itchyny
|
" Author: itchyny
|
||||||
" License: MIT License
|
" License: MIT License
|
||||||
" Last Change: 2013/09/10 20:38:31.
|
" Last Change: 2013/09/11 15:08:32.
|
||||||
" =============================================================================
|
" =============================================================================
|
||||||
|
|
||||||
let s:save_cpo = &cpo
|
let s:save_cpo = &cpo
|
||||||
@@ -320,7 +320,7 @@ function! lightline#tabline()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! lightline#tabs()
|
function! lightline#tabs()
|
||||||
let [t, l, x, y, z, u, d] = [tabpagenr(), tabpagenr('$'), [], [], [], '...', min([max([winwidth('.') / 40, 2]), 8])]
|
let [t, l, x, y, z, u, d] = [tabpagenr(), tabpagenr('$'), [], [], [], '...', min([max([winwidth(0) / 40, 2]), 8])]
|
||||||
for i in range(1, l)
|
for i in range(1, l)
|
||||||
call add(i<t?(x):i==t?(y):z, '%'.i.'T%{lightline#onetab('.i.','.(i==t).')}'.(i==l?'%T':''))
|
call add(i<t?(x):i==t?(y):z, '%'.i.'T%{lightline#onetab('.i.','.(i==t).')}'.(i==l?'%T':''))
|
||||||
endfor
|
endfor
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Version: 0.0
|
|||||||
Author: itchyny (https://github.com/itchyny)
|
Author: itchyny (https://github.com/itchyny)
|
||||||
License: MIT License
|
License: MIT License
|
||||||
Repository: https://github.com/itchyny/lightline.vim
|
Repository: https://github.com/itchyny/lightline.vim
|
||||||
Last Change: 2013/09/10 20:40:34.
|
Last Change: 2013/09/12 12:55:19.
|
||||||
|
|
||||||
CONTENTS *lightline-contents*
|
CONTENTS *lightline-contents*
|
||||||
|
|
||||||
@@ -301,7 +301,18 @@ look nice.
|
|||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
<
|
<
|
||||||
|
If the statusline does not correctly show the special characters, use the
|
||||||
|
unicode numbers. For |powerline| font users:
|
||||||
|
>
|
||||||
|
\ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
|
||||||
|
\ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
|
||||||
|
<
|
||||||
|
For |vim-powerline| font users:
|
||||||
|
>
|
||||||
|
\ 'separator': { 'left': "\u2b80", 'right': "\u2b82" },
|
||||||
|
\ 'subseparator': { 'left': "\u2b81", 'right': "\u2b83" }
|
||||||
|
<
|
||||||
|
See |lightline-problem-8| for more detail.
|
||||||
==============================================================================
|
==============================================================================
|
||||||
FUNCTION *lightline-function*
|
FUNCTION *lightline-function*
|
||||||
Exposed functions for lightline.vim.
|
Exposed functions for lightline.vim.
|
||||||
@@ -778,7 +789,7 @@ Problem 7: |lightline-problem-7|
|
|||||||
patched font.
|
patched font.
|
||||||
|
|
||||||
Problem 8: |lightline-problem-8|
|
Problem 8: |lightline-problem-8|
|
||||||
Triangles look weird.
|
Triangles do not appear. Triangles look weird.
|
||||||
|
|
||||||
Problem 9: |lightline-problem-9|
|
Problem 9: |lightline-problem-9|
|
||||||
Where can I find the list of all the cool characters for patched fonts?
|
Where can I find the list of all the cool characters for patched fonts?
|
||||||
@@ -917,8 +928,30 @@ Problem 7: *lightline-problem-7*
|
|||||||
|vim-powerline|.
|
|vim-powerline|.
|
||||||
|
|
||||||
Problem 8: *lightline-problem-8*
|
Problem 8: *lightline-problem-8*
|
||||||
Triangles look weird.
|
Triangles do not appear. Triangles look weird.
|
||||||
|
|
||||||
|
If the triangles do not appear (but you get some spaces or
|
||||||
|
weird characters like <bf> or ¿), firstly try adding
|
||||||
|
>
|
||||||
|
scriptencoding utf-8
|
||||||
|
<
|
||||||
|
to the head of your .vimrc(_vimrc). Still you have weird
|
||||||
|
characters, use the unicode numbers. For |powerline| font
|
||||||
|
users:
|
||||||
|
>
|
||||||
|
\ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
|
||||||
|
\ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
|
||||||
|
<
|
||||||
|
For |vim-powerline| font users:
|
||||||
|
>
|
||||||
|
\ 'separator': { 'left': "\u2b80", 'right': "\u2b82" },
|
||||||
|
\ 'subseparator': { 'left': "\u2b81", 'right': "\u2b83" }
|
||||||
|
<
|
||||||
|
The full list of unicode numbers for fancy characters is shown
|
||||||
|
in |lightline-problem-9|.
|
||||||
|
|
||||||
|
If the triangles are shown in appropriate characters but the
|
||||||
|
colors do not look correctly, see the following.
|
||||||
If you are using iTerm2, change the following settings.
|
If you are using iTerm2, change the following settings.
|
||||||
|
|
||||||
+ set Profiles>Colors>Minimum contrast to the Lowest.
|
+ set Profiles>Colors>Minimum contrast to the Lowest.
|
||||||
@@ -931,13 +964,13 @@ Problem 9: *lightline-problem-9*
|
|||||||
Where can I find the list of all the cool characters for patched fonts?
|
Where can I find the list of all the cool characters for patched fonts?
|
||||||
|
|
||||||
Default powerline vim-powerline
|
Default powerline vim-powerline
|
||||||
separator.left '' '' '⮀'
|
separator.left '' '' (\ue0b0) '⮀' (\u2b80)
|
||||||
separator.right '' '' '⮂'
|
separator.right '' '' (\ue0b2) '⮂' (\u2b82)
|
||||||
subseparator.left '|' '' '⮁'
|
subseparator.left '|' '' (\ue0b1) '⮁' (\u2b81)
|
||||||
subseparator.right '|' '' '⮃'
|
subseparator.right '|' '' (\ue0b4) '⮃' (\u2b83)
|
||||||
branch symbol -- '' '⭠'
|
branch symbol -- '' (\ue0a0) '⭠' (\u2b60)
|
||||||
readonly symbol -- '' '⭤'
|
readonly symbol -- '' (\ue0a2) '⭤' (\u2b64)
|
||||||
linecolumn symbol -- '' '⭡'
|
linecolumn symbol -- '' (\ue0a1) '⭡' (\u2b81)
|
||||||
|
|
||||||
Problem 10: *lightline-problem-10*
|
Problem 10: *lightline-problem-10*
|
||||||
Cool statusline disappears on |unite|, |vimfiler| and |vimshell|
|
Cool statusline disappears on |unite|, |vimfiler| and |vimshell|
|
||||||
|
|||||||
Reference in New Issue
Block a user