From fc6c9120e4a3c8379012c630809a5bccfd0396b4 Mon Sep 17 00:00:00 2001 From: xinleibird Date: Thu, 3 Oct 2013 00:07:57 +0800 Subject: [PATCH] Add a simple eclim's ProjectTree status line --- autoload/airline/extensions/eclim.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/autoload/airline/extensions/eclim.vim b/autoload/airline/extensions/eclim.vim index 3b2f0f3..ff6a84f 100644 --- a/autoload/airline/extensions/eclim.vim +++ b/autoload/airline/extensions/eclim.vim @@ -5,6 +5,16 @@ if !exists(':ProjectCreate') finish endif +function! airline#extensions#eclim#creat_line(...) + if &filetype == "tree" + let builder = a:1 + call builder.add_section('airline_a', ' Project ') + call builder.add_section('airline_b', ' %f ') + call builder.add_section('airline_c', '') + return 1 + endif +endfunction + function! airline#extensions#eclim#get_warnings() let eclimList = eclim#display#signs#GetExisting() if !empty(eclimList) @@ -20,4 +30,6 @@ endfunction function! airline#extensions#eclim#init(ext) call airline#parts#define_function('eclim', 'airline#extensions#eclim#get_warnings') + call a:ext.add_statusline_func('airline#extensions#eclim#creat_line') endfunction +