" 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 viminfo-=h set viminfo+=f1,%,n~/secure/vim/info set viewdir=~/secure/vim/view 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 highlight+=sr set cpoptions+=$ set showcmd set showmatch set completeopt-=preview set diffopt+=indent-heuristic,algorithm:histogram set cursorline set cursorcolumn set colorcolumn=80 set listchars=trail:·,tab:>→,nbsp:% ",eol:¶ set list highlight ExtraWhitespace ctermbg=green ctermfg=blue match ExtraWhitespace /\s\+$/ set relativenumber set numberwidth=3 set ignorecase set smartcase set hlsearch set incsearch set gdefault map :nohlsearch:call mark#Toggle() set wildmode=list:longest set tags=.tags/**/tags; set wildignore=**/.git,**/.tags set exrc set secure " 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 {{{ let MeinStatus = {-> exists("b:mein_status_func") ? b:mein_status_func() : ""} set laststatus=2 set statusline=%F\ %m%r%h%w%k set statusline+=%{len(getqflist())?'[Q]':''} set statusline+=%{len(getloclist(0))?'[L]':''} set statusline+=\ %= 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#%{MeinStatus()} set statusline+=%*\ %P " }}} " View saving {{{ autocmd BufWinLeave ?* silent! if &ft !=# "gitcommit" | mkview | endif autocmd BufWinEnter ?* silent! loadview " }}} " Windows related {{{ nnoremap 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 {{{ nmap :Gvsplit zR 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 highlight SpellLocal term=reverse ctermfg=red ctermbg=cyan " }}} " 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 итп и т.п. " }}} let g:tex_flavor = "latex" set keywordprg=:LspHover let g:sh_no_error = 1 set termwinkey= nmap f nmap _ f_l nmap ] "*yiw nmap p "_diwP nnoremap d "_d vnoremap d "_d map Q gq cmap ][ '[,'] imap imap nmap :buffers:b nmap :registers nmap ' yiwciw""" nmap h1 yypVr=o nmap sc 024i-a >8 24a- nmap :vertical wincmd ] nmap [oc :copen nmap ]oc :cclose nnoremap nmap ZQ :qall nmap ZZ :wall:mksession!:qall command! E Explore command! Ch cd %:p:h command! -bar -nargs=? -bang Tmp :silent vnew|setlocal buftype=nofile bufhidden=hide noswapfile buflisted filetype= modifiable execute "digraphs Ru" .. 0x20BD runtime ftplugin/man.vim packadd cfilter