diff --git a/plugin/settings.vim b/plugin/settings.vim index 70e9959..2959d59 100644 --- a/plugin/settings.vim +++ b/plugin/settings.vim @@ -44,11 +44,6 @@ set guioptions-=T set langmenu=en_US.UTF-8 "}}} -"Colors -"{{{ -set t_Co=256 -""}}} - "Tagbar stuff "{{{ let g:tagbar_autofocus = 1 diff --git a/plugin/statusline.vim b/plugin/statusline.vim index 4d5f80b..b415ba0 100644 --- a/plugin/statusline.vim +++ b/plugin/statusline.vim @@ -10,11 +10,30 @@ function! GetGitStatus() endif endfunction +function! GetFilePath() + let filename=@% + if strlen(filename) == 0 + return '[new]' + elseif strlen(filename) < winwidth(filename) - 40 + return filename + endif + let dirpath=split(@%, '\/') + let result = '' + if expand('%:p') == filename + let result .= '/' + endif + for direntry in dirpath[:-2] + let result .= direntry[0] . '/' + endfor + let result .= expand('%:t') + return result +endfunction + set statusline= set statusline+=%w%q%h "Is it help/preview/loclist? set statusline+=%{GetGitStatus()} "Is it git? set statusline+=\ -set statusline+=%.40f "What's the filename? +set statusline+=%{GetFilePath()} "What's the filename? set statusline+=%m%r "Is it modifiable/readonly? set statusline+=[%LL] "How many lines? set statusline+=%= "Go to the right ---->