" vim: foldmethod=marker:foldlevel=0 set t_Co=16 syntax on filetype on filetype plugin on 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 set history=128 set directory=~/secure/vim/tmp set undodir=~/secure/vim/undo set undofile set autoindent set tabstop=4 set shiftwidth=4 set smarttab set expandtab set nojoinspaces set scrolloff=2 set backspace=indent,eol set shortmess=aoOtI set highlight-=v:Visual set highlight+=vr set cpoptions+=$ set showcmd set showmatch set listchars=trail:·,tab:>→,nbsp:% ",eol:¶ set list set cursorline set cursorcolumn set colorcolumn=80 highlight ExtraWhitespace ctermbg=green ctermfg=blue match ExtraWhitespace /\s\+$/ set relativenumber set numberwidth=3 set ignorecase set smartcase set hlsearch set incsearch set gdefault set wildmode=longest:list set tags=tags;,./; set wildignore=**/_build/*,**/tags,**/.git,**/.hypothesis map :nohlsearch:MarkClear " Folding {{{ set foldmethod=indent set foldnestmax=9 set foldenable set foldcolumn=1 set foldlevel=0 autocmd BufWinEnter * normal zR highlight FoldColumn ctermfg=cyan ctermbg=black 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+=%*\ %P function! LintStatus() " it is overrided in ftplugin/python/pylint.vim return "" endfunction " }}} " View saving {{{ autocmd BufWinLeave *.* mkview autocmd BufWinEnter *.* silent loadview " }}} " Windows related {{{ noremap j noremap k noremap l noremap h nmap - \|_ nmap = = nmap :close autocmd VimResized * wincmd = " }}} " Tmux window naming {{{ set titleold = "" set title autocmd BufEnter * let &titlestring = expand("%:t") " }}} " Fugitive {{{ let g:fugitive_git_executable = "LANG=en.UTF-8 git" nmap "cyiw:execute "Gvsplit " . @czR nmap :diffupdate:syntax off:syntax on " }}} " *-lists indentation and formatting {{{ set comments-=mb:* set formatlistpat=^\\s*\\*\ \\s* set formatoptions+=onj " }}} " Spelling {{{ set spelllang=ru,en_gb highlight SpellBad cterm=inverse ctermfg=red ctermbg=black " }}} " 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 nmap _ f_l nmap ] "*yiw nmap p "_diwP nnoremap d "_d vnoremap d "_d 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 sc 024i-a >8 24a- nmap :vertical wincmd ] nnoremap command! E Explore command! Ch cd %:p:h command! -bar -nargs=? -bang Tmp :silent vnew|setlocal buftype=nofile bufhidden=hide noswapfile buflisted filetype= modifiable