X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vimrc;h=d44abc32fc2118d9092ba9b4a1c1f59373b6c862;hb=abeca38b2bf8282f0ad673286bc51fbaf59d27f2;hp=883546806d05a2e84b728ea427e5dac0b15d90e8;hpb=a8e62da9c85ce1eeca4a5db5498c0518074e3026;p=dotfiles.git diff --git a/vim/.vimrc b/vim/.vimrc index 8835468..d44abc3 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -8,7 +8,6 @@ set nocompatible set encoding=utf-8 "set t_kD= set mouse="" " if Vim is compiled with mouse support -set nomodeline set viminfo='100,<50,s10,f1,%,n~/secure/vim/info set viewdir=~/secure/vim/view @@ -28,11 +27,13 @@ set backspace=indent,eol set shortmess=aoOtI set highlight-=v:Visual set highlight+=vr +set highlight+=sr set cpoptions+=$ set showcmd set showmatch -set listchars=trail:·,tab:→→,nbsp:% ",eol:¶ +set listchars=trail:·,tab:>→,nbsp:% ",eol:¶ set list +set completeopt-=preview set cursorline set cursorcolumn @@ -67,19 +68,17 @@ highlight CursorColumn ctermfg=cyan ctermbg=red " }}} " Statusline {{{ -highlight User1 ctermbg=blue ctermfg=black -highlight User2 ctermbg=green ctermfg=black -highlight User3 ctermbg=yellow ctermfg=black -highlight User4 ctermbg=red ctermfg=black set laststatus=2 -set statusline=%n\|%F%m%r%h%w%q\ %= -set statusline+=%1*%Y[%{strlen(&fenc)?&fenc:&enc},%{&ff}] -set statusline+=%2*[%l/%L] -set statusline+=%3*[%c%V:0x%B] -set statusline+=%4*%{LintStatus()} +set statusline=%F\ %m%r%h%w%q%k\ %= +set statusline+=%n\ %#Question#%Y +set statusline+=%#DiffChange#%{strlen(&fenc)?&fenc:&enc}%{&bomb?'-bom':''}\ %{&ff} +set statusline+=%#DiffAdd#%l/%L +set statusline+=%#Todo#%c%V:0x%B +set statusline+=%#Comment#%o +set statusline+=%#Error#%{LintStatus()} set statusline+=%*\ %P -function! LintStatus() " it is overrided in ftplugin/python/pylint.vim +function! LintStatus() " it is overrided in ftplugins return "" endfunction " }}} @@ -107,15 +106,14 @@ autocmd BufEnter * let &titlestring = expand("%:t") " }}} " Fugitive {{{ -let g:fugitive_git_executable = "LANG=en.UTF-8 git" -nmap "cyiw:execute "Gvsplit " . @czR +nmap :Gvsplit zR nmap :diffupdate:syntax off:syntax on " }}} " *-lists indentation and formatting {{{ set comments-=mb:* set formatlistpat=^\\s*\\*\ \\s* -set formatoptions+=n +set formatoptions+=onj " }}} " Spelling {{{ @@ -123,9 +121,9 @@ set spelllang=ru,en_gb highlight SpellBad cterm=inverse ctermfg=red ctermbg=black " }}} -" Netrw {{{ -let g:netrw_banner = 0 -let g:netrw_bufsettings = "noma nomod nowrap ro nobl" +" Unimpaired-like textwidth switching {{{ +nmap [ob :set textwidth=72 +nmap ]ob :set textwidth=0 " }}} " Often typos {{{ @@ -157,11 +155,10 @@ map Q gq map Y y$ cmap ][ '[,'] nmap :set wrap!:set wrap? -nmap :buffers:buffer +nmap :buffers:b nmap :registers nmap ' yiwciw""" nmap h1 yypVr=o -nmap 72 :set textwidth=72 nmap sc 024i-a >8 24a- nmap :vertical wincmd ] nnoremap