X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vimrc;h=8b67c498ad68cb0edb4641e3b41a5ff758847a5c;hb=6044d8e15a4c579d9cd808a16896b99f92e35f21;hp=dd8c250cb8477ba8bf45fc980a440b5bb74ba018;hpb=8b6c945696a9ecc99cd51b70a54045b34a159982;p=dotfiles.git diff --git a/vim/.vimrc b/vim/.vimrc index dd8c250..8b67c49 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,10 +27,11 @@ 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 cursorline @@ -67,19 +67,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}\ %{&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,8 +105,7 @@ 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 " }}} @@ -123,9 +120,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 +154,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