Hello itchyny,
Thank you for all of your work on these plug-ins; appreciate it. Can I ask your advice in activating the powerline glyphs in the status bar? Also, information/glyphs on the git status and read only mode; I am currently using both your lightline.vim and gitbranch.vim plugins and have the solarized theme in my terminal and vim, including the lightline colourized theme.
Thanks again.
The gitbranch.vim plugin only provides the information of the branch name. Further status of git is available with other plugins, for example, https://github.com/airblade/vim-gitgutter.
Here's an example of configuration of lightline, with gitbranch and gitgutter.
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'gitbranch', 'gitgutter', 'filename' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'LightLineGitBranch',
\ 'gitgutter': 'LightLineGitGutter',
\ }
\ }
function! LightLineGitBranch()
if exists("*gitbranch#name")
let branch = gitbranch#name()
return branch !=# '' ? 'â '.branch : ''
endif
return ''
endfunction
function! LightLineGitGutter()
if exists('*GitGutterGetHunkSummary')
let [ added, modified, removed ] = GitGutterGetHunkSummary()
return printf('+%d ~%d -%d', added, modified, removed)
endif
return ''
endfunction
The font glyphs are listed in the document of lightline. See :h lightline-problem-9.
Superb, thank you for the pointer; your doc is really useful.
Thank you.
Most helpful comment
The gitbranch.vim plugin only provides the information of the branch name. Further status of git is available with other plugins, for example, https://github.com/airblade/vim-gitgutter.
Here's an example of configuration of lightline, with gitbranch and gitgutter.
The font glyphs are listed in the document of lightline. See
:h lightline-problem-9.