From ac5e6df5cac0f3ff3078c51f715978288a5c351d Mon Sep 17 00:00:00 2001 From: itchyny Date: Mon, 16 May 2016 22:53:29 +0900 Subject: [PATCH] update hte examples in the README and doc: replace the _ variable with branch --- README.md | 12 ++++++------ doc/lightline.txt | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4b0a2b4..03f5da1 100644 --- a/README.md +++ b/README.md @@ -520,8 +520,8 @@ Oops! We forgot the cool mark for the branch component! (work with the patched f ```vim function! LightLineFugitive() if exists("*fugitive#head") - let _ = fugitive#head() - return _ !=# '' ? '⭠ '._ : '' + let branch = fugitive#head() + return branch !=# '' ? '⭠ '.branch : '' endif return '' endfunction @@ -596,8 +596,8 @@ endfunction function! LightLineFugitive() if &ft !~? 'vimfiler\|gundo' && exists("*fugitive#head") - let _ = fugitive#head() - return _ !=# '' ? '⭠ '._ : '' + let branch = fugitive#head() + return branch !=# '' ? '⭠ '.branch : '' endif return '' endfunction @@ -691,8 +691,8 @@ function! LightLineFugitive() try if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') let mark = '' " edit here for cool mark - let _ = fugitive#head() - return _ !=# '' ? mark._ : '' + let branch = fugitive#head() + return branch !=# '' ? mark.branch : '' endif catch endtry diff --git a/doc/lightline.txt b/doc/lightline.txt index 541e23c..a7e176c 100644 --- a/doc/lightline.txt +++ b/doc/lightline.txt @@ -4,7 +4,7 @@ Version: 0.0 Author: itchyny (https://github.com/itchyny) License: MIT License 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* @@ -286,8 +286,8 @@ nice. endfunction function! LightLineFugitive() if exists('*fugitive#head') - let _ = fugitive#head() - return _ !=# '' ? ''._ : '' + let branch = fugitive#head() + return branch !=# '' ? ''.branch : '' endif return '' endfunction @@ -311,8 +311,8 @@ look nice. endfunction function! LightLineFugitive() if exists('*fugitive#head') - let _ = fugitive#head() - return _ !=# '' ? '⭠ '._ : '' + let branch = fugitive#head() + return branch !=# '' ? '⭠ '.branch : '' endif return '' endfunction @@ -741,8 +741,8 @@ A nice example for |vim-powerline| font users: endfunction function! LightLineFugitive() if &ft !~? 'vimfiler' && exists('*fugitive#head') - let _ = fugitive#head() - return _ !=# '' ? '⭠ '._ : '' + let branch = fugitive#head() + return branch !=# '' ? '⭠ '.branch : '' endif return '' endfunction @@ -802,8 +802,8 @@ For users who uses lots of plugins: try if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') let mark = '' " edit here for cool mark - let _ = fugitive#head() - return _ !=# '' ? mark._ : '' + let branch = fugitive#head() + return branch !=# '' ? mark.branch : '' endif catch endtry