From d7d4eadb02b1fc43da22c2d0fc129ff4f538ef65 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Fri, 7 Jul 2017 12:12:51 +0200 Subject: Improved lightline, added branchname & current tag --- vimrc-full | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'vimrc-full') diff --git a/vimrc-full b/vimrc-full index 4825863..54504ad 100644 --- a/vimrc-full +++ b/vimrc-full @@ -1,4 +1,4 @@ -set" vim: tabstop=2 softtabstop=2 shiftwidth=2 textwidth=160 iskeyword+=\: +" vim: tabstop=2 softtabstop=2 shiftwidth=2 textwidth=160 iskeyword+=\: set encoding=utf-8 | " set up vim's cosole encoding (not file encoding, for which there is fileencoding=) set t_Co=256 | " required on some ssh sessions @@ -223,8 +223,9 @@ let g:lightline = { \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }, \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'absolutepath', 'readonly' ] ], + \ 'left': [ [ 'mode', 'paste', 'readonly' ], + \ [ 'gitbranch', 'absolutepath' ], + \ [ 'tagbar' ] ], \ 'right': [ [ 'lineinfo', 'percent' ], \ [ 'spell', 'fileencoding', 'fileformat', 'filetype' ] ], \ }, @@ -232,6 +233,9 @@ let g:lightline = { \ 'left': [ [ 'bufferinfo' ], [ 'bufferbefore', 'buffercurrent', 'bufferafter' ], ], \ 'right': [ [ 'close' ], [ 'getcwd', 'gitbranch'] ], \ }, + \ 'component': { + \ 'tagbar': '%{tagbar#currenttag("%s", "", "f")}', + \ }, \ 'component_expand': { \ 'buffercurrent': 'lightline#buffer#buffercurrent2', \ }, @@ -244,8 +248,8 @@ let g:lightline = { \ 'bufferinfo': 'lightline#buffer#bufferinfo', \ 'filetype': 'MyFiletype', \ 'fileformat': 'MyFileformat', - \ 'gitbranch': 'MyBranchname', \ 'getcwd': 'getcwd', + \ 'gitbranch': 'fugitive#head' \ }, \ } -- cgit v1.2.3