From 5d47f01f94ef508033a41ebcfc3de989755fd3ca Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sat, 23 Jun 2018 01:10:55 +0200 Subject: Improved UI consistency --- vimrc-full | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'vimrc-full') diff --git a/vimrc-full b/vimrc-full index ca36df7..6e29373 100644 --- a/vimrc-full +++ b/vimrc-full @@ -906,6 +906,7 @@ autocmd FileType c,cpp,objc map = :pyf /usr/share/clang/clang-format.py command BuffersToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))')) command BufToArg :argadd %:. +command Gbranch call setqflist([], 'r', {'title':'Git branch selector','items':map(systemlist("git branch"), {_, p->{'filename':'branch','module': fnamemodify(p, ':.')}})}) "======================================================================================================================= call plug#end() | " all plugins are getting loaded on this line, don't remove! @@ -1044,14 +1045,14 @@ if empty(argv()) " from the list of recent files: make absolute paths, filter out files not " contained in cwd and finally filter out directories and non-files... autocmd StdinReadPre * let s:std_in=1 - autocmd VimEnter * if !exists("s:std_in") | call setqflist([], 'r', + autocmd VimEnter * if !exists("s:std_in") | call setloclist(0, [], 'r', \ { \ 'title':'Recently used files in directory: '.getcwd(), \ 'items':map(filter(filter( \ map(copy(v:oldfiles), \ {_, p->expand(p)}), 'v:val =~ "'.getcwd().'/"'), 'filereadable(v:val)'), \ {_, p->{'filename': fnamemodify(p, ':.')}}) - \ }) | copen | only + \ }) | lopen | only endif command Vimls @@ -1156,8 +1157,8 @@ augroup status \ ."%{winbufnr(0).' '.nr2char(0xe621)}" \ ."%{(&readonly\ ?\ '\ \ \ '\ :\ '')}" \ ."%{(&modified\ ?\ nr2char(0xF0C7).'\ '\ :\ '')\ }" - \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ ''\ :\ fnamemodify(getcwd(),\ ':~').nr2char(0xf44a))}\ " - \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ b:term_title\ :\ bufname('%'))\ }" + \ ."%{(haslocaldir() ?\ fnamemodify(getcwd(),\ ':.').' '.nr2char(0xe0b1)\ \:\ '')}\ " + \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ b:term_title\ :\ substitute(expand('%:p'),\ '^'.getcwd(-1).'/*',\ '',\ ''))\ }" \ ."%#".l:invert_group."#" \ ."%{nr2char(0xE0B4)\ }" \ .'' @@ -1182,9 +1183,10 @@ augroup status let l:invert_group = CreateInvertGroup(a:highlight_group) return '' \ ."%#".a:highlight_group."#" - \ ."%3(\ %)" + \ ."%3( \ %)" + \ ."%{getcwd(-1)}" \ ."%{nr2char(0xe621)}" - \ ."%(%{v:servername}\ %{v:this_session}%)" + \ ."%(\ \ %{fugitive#head()}\ %)" \ ."%#".l:invert_group."#" \ ."%{nr2char(0xE0B4)\ }" \ .'' @@ -1193,7 +1195,8 @@ augroup status \ ."%#".l:invert_group."#" \ ."%{nr2char(0xE0B6)}" \ ."%#".a:highlight_group."#" - \ ."%(\ \ %{fugitive#head()}\ %)" + \ ."%3(\ %)" + \ ."%(%{v:servername}\ %{v:this_session}%)" \ ."%{nr2char(0xe621)}" \ ."%(\ \ %{tabpagenr()}/%{tabpagenr('$')}\ %)" \ ."%##" @@ -1212,10 +1215,8 @@ augroup status set tabline=%!UpdateTabline(g:group_tabline) endfunction " apply colors from the loaded colorscheme... - call ApplyColorScheme() - " when changing the colorscheme also apply new colors to the statusbar... - autocmd ColorScheme * call ApplyColorScheme() + autocmd VimEnter,ColorScheme * call ApplyColorScheme() autocmd WinEnter * setlocal statusline=%!UpdateStatus(g:group_active) autocmd WinLeave * setlocal statusline< -- cgit v1.2.3