X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vimrc;h=d0c490c2f187fc4cda6220a30161fdce94203599;hb=938d32799f6c7db3ad1579ba43ee10750e3f710a;hp=2f6a20ada65813716b7101570315bda597e4b5d9;hpb=0491e759328448a035d81ef9bc3c581833c9a7d8;p=config%2Fdotfiles.git diff --git a/vimrc b/vimrc index 2f6a20a..d0c490c 100644 --- a/vimrc +++ b/vimrc @@ -388,7 +388,7 @@ if has('statusline') endif endfunction - " Display unexpected 'fileformat' and 'fileencoding' settings. + " Display unexpected 'fileformat', 'fileencoding' and 'bomb' settings. function! s:StatuslineFileFormat() if &fileformat != 'unix' return '[' . &fileformat . ']' @@ -404,6 +404,13 @@ if has('statusline') return '' endif endfunction + function! s:StatuslineFileBOMB() + if exists('+bomb') && &bomb + return '[BOM]' + else + return '' + endif + endfunction " Return current syntax group in brackets or nothing if there's none. function! s:StatuslineSyntaxGroup() @@ -428,6 +435,9 @@ if has('statusline') function! SFE() return s:StatuslineFileEncoding() endfunction + function! SFB() + return s:StatuslineFileBOMB() + endfunction function! SSG() return s:StatuslineSyntaxGroup() endfunction @@ -452,6 +462,7 @@ if has('statusline') set statusline+=%#Error# " display warnings set statusline+=%{SFF()} " - unexpected file format set statusline+=%{SFE()} " - unexpected file encoding + set statusline+=%{SFB()} " - unexpected file byte order mask set statusline+=%## " continue with normal colors endif @@ -889,6 +900,7 @@ if has('eval') " Don't manage the working directory (the default setting is too slow for " me). let g:ctrlp_working_path_mode = 0 + " Path to cache directory. I prefer to keep generated files as local as " possible. let g:ctrlp_cache_dir = $HOME . '/.vim/cache/ctrlp' @@ -896,6 +908,10 @@ if has('eval') " cache manually. let g:ctrlp_clear_cache_on_exit = 0 + " Don't switch the window if the selected buffer is already open. I want + " to open another view on this buffer in most cases. + let g:ctrlp_switch_buffer = 0 + " FSWitch settings. " Defaults don't work well for my projects. augroup vimrc @@ -907,6 +923,10 @@ if has('eval') " Switch to corresponding header/source file. nnoremap h :FSHere + +" netrw settings. + " Don't create ~/.vim/.netrwhist history file. + let g:netrw_dirhistmax = 0 endif