diff options
Diffstat (limited to 'vimrc-full')
-rw-r--r-- | vimrc-full | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -906,6 +906,7 @@ autocmd FileType c,cpp,objc map <buffer> = :pyf /usr/share/clang/clang-format.py | |||
906 | 906 | ||
907 | command BuffersToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))')) | 907 | command BuffersToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))')) |
908 | command BufToArg :argadd %:. | 908 | command BufToArg :argadd %:. |
909 | command Gbranch call setqflist([], 'r', {'title':'Git branch selector','items':map(systemlist("git branch"), {_, p->{'filename':'branch','module': fnamemodify(p, ':.')}})}) | ||
909 | 910 | ||
910 | "======================================================================================================================= | 911 | "======================================================================================================================= |
911 | call plug#end() | " all plugins are getting loaded on this line, don't remove! | 912 | call plug#end() | " all plugins are getting loaded on this line, don't remove! |
@@ -1044,14 +1045,14 @@ if empty(argv()) | |||
1044 | " from the list of recent files: make absolute paths, filter out files not | 1045 | " from the list of recent files: make absolute paths, filter out files not |
1045 | " contained in cwd and finally filter out directories and non-files... | 1046 | " contained in cwd and finally filter out directories and non-files... |
1046 | autocmd StdinReadPre * let s:std_in=1 | 1047 | autocmd StdinReadPre * let s:std_in=1 |
1047 | autocmd VimEnter * if !exists("s:std_in") | call setqflist([], 'r', | 1048 | autocmd VimEnter * if !exists("s:std_in") | call setloclist(0, [], 'r', |
1048 | \ { | 1049 | \ { |
1049 | \ 'title':'Recently used files in directory: '.getcwd(), | 1050 | \ 'title':'Recently used files in directory: '.getcwd(), |
1050 | \ 'items':map(filter(filter( | 1051 | \ 'items':map(filter(filter( |
1051 | \ map(copy(v:oldfiles), | 1052 | \ map(copy(v:oldfiles), |
1052 | \ {_, p->expand(p)}), 'v:val =~ "'.getcwd().'/"'), 'filereadable(v:val)'), | 1053 | \ {_, p->expand(p)}), 'v:val =~ "'.getcwd().'/"'), 'filereadable(v:val)'), |
1053 | \ {_, p->{'filename': fnamemodify(p, ':.')}}) | 1054 | \ {_, p->{'filename': fnamemodify(p, ':.')}}) |
1054 | \ }) | copen | only | 1055 | \ }) | lopen | only |
1055 | endif | 1056 | endif |
1056 | 1057 | ||
1057 | command Vimls | 1058 | command Vimls |
@@ -1156,8 +1157,8 @@ augroup status | |||
1156 | \ ."%{winbufnr(0).' '.nr2char(0xe621)}" | 1157 | \ ."%{winbufnr(0).' '.nr2char(0xe621)}" |
1157 | \ ."%{(&readonly\ ?\ '\ \ \ '\ :\ '')}" | 1158 | \ ."%{(&readonly\ ?\ '\ \ \ '\ :\ '')}" |
1158 | \ ."%{(&modified\ ?\ nr2char(0xF0C7).'\ '\ :\ '')\ }" | 1159 | \ ."%{(&modified\ ?\ nr2char(0xF0C7).'\ '\ :\ '')\ }" |
1159 | \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ ''\ :\ fnamemodify(getcwd(),\ ':~').nr2char(0xf44a))}\ " | 1160 | \ ."%{(haslocaldir() ?\ fnamemodify(getcwd(),\ ':.').' '.nr2char(0xe0b1)\ \:\ '')}\ " |
1160 | \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ b:term_title\ :\ bufname('%'))\ }" | 1161 | \ ."%{(&buftype\ ==\ \"terminal\"\ ?\ b:term_title\ :\ substitute(expand('%:p'),\ '^'.getcwd(-1).'/*',\ '',\ ''))\ }" |
1161 | \ ."%#".l:invert_group."#" | 1162 | \ ."%#".l:invert_group."#" |
1162 | \ ."%{nr2char(0xE0B4)\ }" | 1163 | \ ."%{nr2char(0xE0B4)\ }" |
1163 | \ .'' | 1164 | \ .'' |
@@ -1182,9 +1183,10 @@ augroup status | |||
1182 | let l:invert_group = CreateInvertGroup(a:highlight_group) | 1183 | let l:invert_group = CreateInvertGroup(a:highlight_group) |
1183 | return '' | 1184 | return '' |
1184 | \ ."%#".a:highlight_group."#" | 1185 | \ ."%#".a:highlight_group."#" |
1185 | \ ."%3(\ %)" | 1186 | \ ."%3( \ %)" |
1187 | \ ."%{getcwd(-1)}" | ||
1186 | \ ."%{nr2char(0xe621)}" | 1188 | \ ."%{nr2char(0xe621)}" |
1187 | \ ."%(%{v:servername}\ %{v:this_session}%)" | 1189 | \ ."%(\ \ %{fugitive#head()}\ %)" |
1188 | \ ."%#".l:invert_group."#" | 1190 | \ ."%#".l:invert_group."#" |
1189 | \ ."%{nr2char(0xE0B4)\ }" | 1191 | \ ."%{nr2char(0xE0B4)\ }" |
1190 | \ .'' | 1192 | \ .'' |
@@ -1193,7 +1195,8 @@ augroup status | |||
1193 | \ ."%#".l:invert_group."#" | 1195 | \ ."%#".l:invert_group."#" |
1194 | \ ."%{nr2char(0xE0B6)}" | 1196 | \ ."%{nr2char(0xE0B6)}" |
1195 | \ ."%#".a:highlight_group."#" | 1197 | \ ."%#".a:highlight_group."#" |
1196 | \ ."%(\ \ %{fugitive#head()}\ %)" | 1198 | \ ."%3(\ %)" |
1199 | \ ."%(%{v:servername}\ %{v:this_session}%)" | ||
1197 | \ ."%{nr2char(0xe621)}" | 1200 | \ ."%{nr2char(0xe621)}" |
1198 | \ ."%(\ \ %{tabpagenr()}/%{tabpagenr('$')}\ %)" | 1201 | \ ."%(\ \ %{tabpagenr()}/%{tabpagenr('$')}\ %)" |
1199 | \ ."%##" | 1202 | \ ."%##" |
@@ -1212,10 +1215,8 @@ augroup status | |||
1212 | set tabline=%!UpdateTabline(g:group_tabline) | 1215 | set tabline=%!UpdateTabline(g:group_tabline) |
1213 | endfunction | 1216 | endfunction |
1214 | " apply colors from the loaded colorscheme... | 1217 | " apply colors from the loaded colorscheme... |
1215 | call ApplyColorScheme() | ||
1216 | |||
1217 | " when changing the colorscheme also apply new colors to the statusbar... | 1218 | " when changing the colorscheme also apply new colors to the statusbar... |
1218 | autocmd ColorScheme * call ApplyColorScheme() | 1219 | autocmd VimEnter,ColorScheme * call ApplyColorScheme() |
1219 | 1220 | ||
1220 | autocmd WinEnter * setlocal statusline=%!UpdateStatus(g:group_active) | 1221 | autocmd WinEnter * setlocal statusline=%!UpdateStatus(g:group_active) |
1221 | autocmd WinLeave * setlocal statusline< | 1222 | autocmd WinLeave * setlocal statusline< |