1 " vim: foldmethod=marker:foldlevel=0
10 set mouse="" " if Vim is compiled with mouse support
13 set viminfo+=f1,%,n~/secure/vim/info
14 set viewdir=~/secure/vim/view
15 set directory=~/secure/vim/tmp
16 set undodir=~/secure/vim/undo
26 set backspace=indent,eol
28 set highlight-=v:Visual
34 set completeopt-=preview
35 set diffopt+=indent-heuristic,algorithm:histogram
41 set listchars=trail:·,tab:>→,nbsp:% ",eol:¶
43 highlight ExtraWhitespace ctermbg=green ctermfg=blue
44 match ExtraWhitespace /\s\+$/
54 map <F4> :nohlsearch<CR>:call mark#Toggle()<CR>
56 set wildmode=list:longest
57 set tags=.tags/**/tags;
58 set wildignore=**/.git,**/.tags
70 autocmd BufWinEnter * normal zR
71 highlight FoldColumn ctermfg=cyan ctermbg=black
72 highlight CursorColumn ctermfg=cyan ctermbg=red
76 let MeinStatus = {-> exists("b:mein_status_func") ? b:mein_status_func() : ""}
78 set statusline=%F\ %m%r%h%w%k
79 set statusline+=%{len(getqflist())?'[Q]':''}
80 set statusline+=%{len(getloclist(0))?'[L]':''}
82 set statusline+=%n\ %#Question#%Y
83 set statusline+=%#DiffChange#%{strlen(&fenc)?&fenc:&enc}%{&bomb?'-bom':''}\ %{&ff}
84 set statusline+=%#DiffAdd#%l/%L
85 set statusline+=%#Todo#%c%V:0x%B
86 set statusline+=%#Comment#%o
87 set statusline+=%#Error#%{MeinStatus()}
88 set statusline+=%*\ %P
92 autocmd BufWinLeave ?* silent! if &ft !=# "gitcommit" | mkview | endif
93 autocmd BufWinEnter ?* silent! loadview
102 nmap <leader>- <C-w>\|<C-w>_
103 nmap <leader>= <C-w>=
104 nmap <Del> :close<CR>
105 autocmd VimResized * wincmd =
108 " Tmux window naming {{{
111 autocmd BufEnter * let &titlestring = expand("%:t")
115 nmap <F7> :Gvsplit <C-R><C-W><CR>zR
116 nmap <F9> :diffupdate<CR>:syntax off<CR>:syntax on<CR>
119 " *-lists indentation and formatting {{{
121 set formatlistpat=^\\s*\\*\ \\s*
122 set formatoptions+=onj
126 set spelllang=ru,en_gb
127 highlight SpellBad cterm=inverse ctermfg=red ctermbg=black
128 highlight SpellLocal term=reverse ctermfg=red ctermbg=cyan
131 " Unimpaired-like textwidth switching {{{
132 nmap [ob :set textwidth=72<CR>
133 nmap ]ob :set textwidth=0<CR>
140 imap <F1> <C-O>:help!<CR>
145 let g:tex_flavor = "latex"
146 set keywordprg=:LspHover
147 let g:sh_no_error = 1
150 nmap <space> f<space>
154 nmap <leader>p "_diwP
156 nnoremap <leader>d "_d
157 vnoremap <leader>d "_d
161 imap <C-b> <C-x><C-o>
162 imap <C-@> <C-x><C-f>
163 nmap <Tab> :buffers<CR>:b<Space>
164 nmap <silent> <Home> :registers<CR>
165 nmap <leader>' yiwciw"<C-r>""<ESC>
166 nmap <leader>h1 yypVr=o
167 nmap <leader>sc 024i-<ESC>a >8 <ESC>24a-<ESC>
168 nmap <leader><C-]> :vertical wincmd ]<CR>
174 nmap ZZ :wall<CR>:mksession!<CR>:qall<CR>
178 command! -bar -nargs=? -bang Tmp :silent vnew<bang>|setlocal buftype=nofile bufhidden=hide noswapfile buflisted filetype=<args> modifiable
180 execute "digraphs Ru" .. 0x20BD
182 runtime ftplugin/man.vim