X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vimrc;h=575811106582de40cd990a0b4f2c6b458b4e85ec;hb=c32b25ce56895da8a0445f5c1f0bcb796efc3f8c;hp=af68bd1bf9a6bd6f39aa010bd03e63e922e5f548;hpb=df3d205ae088266da2add01a9d2cab13eb8cb7d1;p=dotfiles.git diff --git a/vim/.vimrc b/vim/.vimrc index af68bd1..5758111 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -28,17 +28,18 @@ 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 set cursorcolumn set colorcolumn=80 highlight ExtraWhitespace ctermbg=green ctermfg=blue -match ExtraWhitespace /^\s*$/ +match ExtraWhitespace /\s\+$/ set relativenumber set numberwidth=3 @@ -79,7 +80,7 @@ set statusline+=%3*[%c%V:0x%B] set statusline+=%4*%{LintStatus()} set statusline+=%*\ %P -function! LintStatus() " it is overrided in ftplugin/python/pylint.vim +function! LintStatus() " it is overrided in ftplugins return "" endfunction " }}} @@ -103,6 +104,7 @@ autocmd VimResized * wincmd = " Tmux window naming {{{ set titleold = "" set title +autocmd BufEnter * let &titlestring = expand("%:t") " }}} " Fugitive {{{ @@ -114,19 +116,30 @@ nmap :diffupdate:syntax off:syntax on " *-lists indentation and formatting {{{ set comments-=mb:* set formatlistpat=^\\s*\\*\ \\s* -set formatoptions+=n +set formatoptions+=onj " }}} -autocmd BufEnter * let &titlestring = expand("%:t") - -set keywordprg= +" Spelling {{{ +set spelllang=ru,en_gb +highlight SpellBad cterm=inverse ctermfg=red ctermbg=black +" }}} -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 +" Often typos {{{ map q: : command! W w +nmap :help! +imap :help! +iabbrev итд и т.д. +iabbrev итп и т.п. +" }}} + +set keywordprg= +let g:sh_no_error = 1 nmap f vmap Igv @@ -135,9 +148,6 @@ nmap _ f_l nmap ] "*yiw nmap p "_diwP -nmap ]q :cnext -nmap [q :cprev - nnoremap d "_d vnoremap d "_d @@ -147,24 +157,15 @@ cmap map Q gq map Y y$ cmap ][ '[,'] +nmap :set wrap!:set wrap? nmap :buffers:buffer nmap :registers nmap ' yiwciw""" nmap h1 yypVr=o -nmap 72 :set textwidth=72 nmap sc 024i-a >8 24a- nmap :vertical wincmd ] nnoremap -nmap :help! -imap :help! - -nmap sp :setlocal spell spelllang=ru,en_gb -highlight SpellBad cterm=inverse ctermfg=red ctermbg=black - -iabbrev итд и т.д. -iabbrev итп и т.п. - command! E Explore command! Ch cd %:p:h command! -bar -nargs=? -bang Tmp :silent vnew|setlocal buftype=nofile bufhidden=hide noswapfile buflisted filetype= modifiable