mirror of
https://github.com/amix/vimrc
synced 2025-07-10 11:44:59 +08:00
Updated plugins
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2019 itchyny
|
||||
Copyright (c) 2013-2020 itchyny
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -246,7 +246,7 @@ let g:lightline = {
|
||||
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'gitbranch': 'fugitive#head'
|
||||
\ 'gitbranch': 'FugitiveHead'
|
||||
\ },
|
||||
\ }
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Filename: autoload/lightline.vim
|
||||
" Author: itchyny
|
||||
" License: MIT License
|
||||
" Last Change: 2019/08/20 14:00:00.
|
||||
" Last Change: 2020/01/27 19:41:58.
|
||||
" =============================================================================
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
@ -432,7 +432,7 @@ function! s:line(tabline, inactive) abort
|
||||
let _ .= i < l + len(lt) - len(l_) && ll[i] < l || ll[i] != ll[i + 1] ? p.left : len(lt[i]) ? s.left : ''
|
||||
endfor
|
||||
let _ .= '%#LightlineMiddle_' . mode . '#%='
|
||||
for i in reverse(range(len(rt)))
|
||||
for i in range(len(rt) - 1, 0, -1)
|
||||
let _ .= '%#LightlineRight_' . mode . '_' . rl[i] . '_' . rl[i + 1] . '#'
|
||||
let _ .= i < r + len(rt) - len(r_) && rl[i] < r || rl[i] != rl[i + 1] ? p.right : len(rt[i]) ? s.right : ''
|
||||
let _ .= '%#LightlineRight_' . mode . '_' . rl[i] . '#'
|
||||
|
@ -4,7 +4,7 @@ Version: 0.1
|
||||
Author: itchyny (https://github.com/itchyny)
|
||||
License: MIT License
|
||||
Repository: https://github.com/itchyny/lightline.vim
|
||||
Last Change: 2019/12/27 18:23:29.
|
||||
Last Change: 2020/01/28 18:40:21.
|
||||
|
||||
CONTENTS *lightline-contents*
|
||||
|
||||
@ -148,7 +148,7 @@ OPTIONS *lightline-option*
|
||||
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
||||
\ },
|
||||
\ 'component_function': {
|
||||
\ 'gitbranch': 'fugitive#head'
|
||||
\ 'gitbranch': 'FugitiveHead'
|
||||
\ },
|
||||
\ }
|
||||
<
|
||||
@ -316,8 +316,8 @@ nice.
|
||||
return &readonly ? '' : ''
|
||||
endfunction
|
||||
function! LightlineFugitive()
|
||||
if exists('*fugitive#head')
|
||||
let branch = fugitive#head()
|
||||
if exists('*FugitiveHead')
|
||||
let branch = FugitiveHead()
|
||||
return branch !=# '' ? ''.branch : ''
|
||||
endif
|
||||
return ''
|
||||
@ -341,8 +341,8 @@ look nice.
|
||||
return &readonly ? '⭤' : ''
|
||||
endfunction
|
||||
function! LightlineFugitive()
|
||||
if exists('*fugitive#head')
|
||||
let branch = fugitive#head()
|
||||
if exists('*FugitiveHead')
|
||||
let branch = FugitiveHead()
|
||||
return branch !=# '' ? '⭠ '.branch : ''
|
||||
endif
|
||||
return ''
|
||||
@ -742,8 +742,8 @@ A nice example for non-patched font users.
|
||||
\ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '')
|
||||
endfunction
|
||||
function! LightlineFugitive()
|
||||
if &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||
return fugitive#head()
|
||||
if &ft !~? 'vimfiler' && exists('*FugitiveHead')
|
||||
return FugitiveHead()
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
@ -777,8 +777,8 @@ A nice example for |vim-powerline| font users:
|
||||
\ (LightlineModified() !=# '' ? ' ' . LightlineModified() : '')
|
||||
endfunction
|
||||
function! LightlineFugitive()
|
||||
if &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||
let branch = fugitive#head()
|
||||
if &ft !~? 'vimfiler' && exists('*FugitiveHead')
|
||||
let branch = FugitiveHead()
|
||||
return branch !=# '' ? '⭠ '.branch : ''
|
||||
endif
|
||||
return ''
|
||||
@ -836,9 +836,9 @@ For users who uses lots of plugins:
|
||||
|
||||
function! LightlineFugitive()
|
||||
try
|
||||
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head')
|
||||
if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*FugitiveHead')
|
||||
let mark = '' " edit here for cool mark
|
||||
let branch = fugitive#head()
|
||||
let branch = FugitiveHead()
|
||||
return branch !=# '' ? mark.branch : ''
|
||||
endif
|
||||
catch
|
||||
|
Reference in New Issue
Block a user