X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vimrc;h=65870e15898dbb90e865f205f409cbd3e267f61d;hb=ceb64c286570c7225f46d1763c15dcdb6e8c1baa;hp=a46469930571e86bb288a7df59eaee71125a8808;hpb=0e9fbf394517a0a4cb521b478ac25b990d136544;p=dotfiles.git diff --git a/vim/.vimrc b/vim/.vimrc index a464699..65870e1 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -31,14 +31,14 @@ set highlight+=vr 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 @@ -103,6 +103,7 @@ autocmd VimResized * wincmd = " Tmux window naming {{{ set titleold = "" set title +autocmd BufEnter * let &titlestring = expand("%:t") " }}} " Fugitive {{{ @@ -114,30 +115,35 @@ 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") -autocmd BufRead /tmp/mutt-* setlocal textwidth=72 -autocmd BufRead,BufNewFile *.pyi setlocal filetype=python -autocmd BufRead,BufNewFile *.go setlocal noexpandtab -autocmd BufRead,BufNewFile *.go let g:defsplit_shift=" " -autocmd BufNewFile,BufRead *.tex abbreviate framedo \begin{frame}\frametitle{TODO}\end{frame}k>>wwlcw -autocmd BufNewFile,BufRead *.tex abbreviate itemdo \begin{itemize}\item \end{itemize}k>>$a -autocmd BufNewFile,BufRead *.tex abbreviate cnter \begin{center}\end{center}k$o -autocmd Filetype texinfo abbreviate \t @tab -autocmd Filetype gitcommit setlocal textwidth=72 -autocmd BufRead /tmp/psql.edit* setlocal filetype=sql -autocmd Filetype yaml setlocal shiftwidth=2 - -set keywordprg= +" Spelling {{{ +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" +" }}} -" Often typos +" Unimpaired-like textwidth switching {{{ +nmap [ob :set textwidth=72 +nmap ]ob :set textwidth=0 +" }}} + +" 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 @@ -146,9 +152,6 @@ nmap _ f_l nmap ] "*yiw nmap p "_diwP -nmap ]q :cnext -nmap [q :cprev - nnoremap d "_d vnoremap d "_d @@ -156,25 +159,17 @@ cmap 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