mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-15 23:13:51 -05:00
update hte examples in the README and doc: replace the _ variable with branch
This commit is contained in:
12
README.md
12
README.md
@@ -520,8 +520,8 @@ Oops! We forgot the cool mark for the branch component! (work with the patched f
|
|||||||
```vim
|
```vim
|
||||||
function! LightLineFugitive()
|
function! LightLineFugitive()
|
||||||
if exists("*fugitive#head")
|
if exists("*fugitive#head")
|
||||||
let _ = fugitive#head()
|
let branch = fugitive#head()
|
||||||
return _ !=# '' ? '⭠ '._ : ''
|
return branch !=# '' ? '⭠ '.branch : ''
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
@@ -596,8 +596,8 @@ endfunction
|
|||||||
|
|
||||||
function! LightLineFugitive()
|
function! LightLineFugitive()
|
||||||
if &ft !~? 'vimfiler\|gundo' && exists("*fugitive#head")
|
if &ft !~? 'vimfiler\|gundo' && exists("*fugitive#head")
|
||||||
let _ = fugitive#head()
|
let branch = fugitive#head()
|
||||||
return _ !=# '' ? '⭠ '._ : ''
|
return branch !=# '' ? '⭠ '.branch : ''
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
@@ -691,8 +691,8 @@ function! LightLineFugitive()
|
|||||||
try
|
try
|
||||||
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||||
let mark = '' " edit here for cool mark
|
let mark = '' " edit here for cool mark
|
||||||
let _ = fugitive#head()
|
let branch = fugitive#head()
|
||||||
return _ !=# '' ? mark._ : ''
|
return branch !=# '' ? mark.branch : ''
|
||||||
endif
|
endif
|
||||||
catch
|
catch
|
||||||
endtry
|
endtry
|
||||||
|
|||||||
@@ -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: 2016/05/08 13:56:19.
|
Last Change: 2016/05/16 22:48:37.
|
||||||
|
|
||||||
CONTENTS *lightline-contents*
|
CONTENTS *lightline-contents*
|
||||||
|
|
||||||
@@ -286,8 +286,8 @@ nice.
|
|||||||
endfunction
|
endfunction
|
||||||
function! LightLineFugitive()
|
function! LightLineFugitive()
|
||||||
if exists('*fugitive#head')
|
if exists('*fugitive#head')
|
||||||
let _ = fugitive#head()
|
let branch = fugitive#head()
|
||||||
return _ !=# '' ? ''._ : ''
|
return branch !=# '' ? ''.branch : ''
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
@@ -311,8 +311,8 @@ look nice.
|
|||||||
endfunction
|
endfunction
|
||||||
function! LightLineFugitive()
|
function! LightLineFugitive()
|
||||||
if exists('*fugitive#head')
|
if exists('*fugitive#head')
|
||||||
let _ = fugitive#head()
|
let branch = fugitive#head()
|
||||||
return _ !=# '' ? '⭠ '._ : ''
|
return branch !=# '' ? '⭠ '.branch : ''
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
@@ -741,8 +741,8 @@ A nice example for |vim-powerline| font users:
|
|||||||
endfunction
|
endfunction
|
||||||
function! LightLineFugitive()
|
function! LightLineFugitive()
|
||||||
if &ft !~? 'vimfiler' && exists('*fugitive#head')
|
if &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||||
let _ = fugitive#head()
|
let branch = fugitive#head()
|
||||||
return _ !=# '' ? '⭠ '._ : ''
|
return branch !=# '' ? '⭠ '.branch : ''
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
@@ -802,8 +802,8 @@ For users who uses lots of plugins:
|
|||||||
try
|
try
|
||||||
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||||
let mark = '' " edit here for cool mark
|
let mark = '' " edit here for cool mark
|
||||||
let _ = fugitive#head()
|
let branch = fugitive#head()
|
||||||
return _ !=# '' ? mark._ : ''
|
return branch !=# '' ? mark.branch : ''
|
||||||
endif
|
endif
|
||||||
catch
|
catch
|
||||||
endtry
|
endtry
|
||||||
|
|||||||
Reference in New Issue
Block a user