1 " vim: foldmethod=marker:foldlevel=0
10 set mouse="" " if Vim is compiled with mouse support
13 set viminfo='100,<50,s10,f1,%,n~/secure/vim/info
14 set viewdir=~/secure/vim/view
16 set directory=~/secure/vim/tmp
17 set undodir=~/secure/vim/undo
27 set backspace=indent,eol
29 set highlight-=v:Visual
34 set listchars=trail:·,tab:>→,nbsp:% ",eol:¶
40 highlight ExtraWhitespace ctermbg=green ctermfg=blue
41 match ExtraWhitespace /\s\+$/
51 set wildmode=longest:list
53 set wildignore=**/_build/*,**/tags,**/.git,**/.hypothesis
55 map <F4> :nohlsearch<CR>:MarkClear<CR>
64 autocmd BufWinEnter * normal zR
65 highlight FoldColumn ctermfg=cyan ctermbg=black
66 highlight CursorColumn ctermfg=cyan ctermbg=red
70 highlight User1 ctermbg=blue ctermfg=black
71 highlight User2 ctermbg=green ctermfg=black
72 highlight User3 ctermbg=yellow ctermfg=black
73 highlight User4 ctermbg=red ctermfg=black
75 set statusline=%n\|%F%m%r%h%w%q\ %=
76 set statusline+=%1*%Y[%{strlen(&fenc)?&fenc:&enc},%{&ff}]
77 set statusline+=%2*[%l/%L]
78 set statusline+=%3*[%c%V:0x%B]
79 set statusline+=%4*%{LintStatus()}
80 set statusline+=%*\ %P
82 function! LintStatus() " it is overrided in ftplugin/python/pylint.vim
88 autocmd BufWinLeave *.* mkview
89 autocmd BufWinEnter *.* silent loadview
97 nmap <leader>- <C-w>\|<C-w>_
100 autocmd VimResized * wincmd =
103 " Tmux window naming {{{
106 autocmd BufEnter * let &titlestring = expand("%:t")
110 let g:fugitive_git_executable = "LANG=en.UTF-8 git"
111 nmap <F7> "cyiw:execute "Gvsplit " . @c<CR>zR
112 nmap <F9> :diffupdate<CR>:syntax off<CR>:syntax on<CR>
115 " *-lists indentation and formatting {{{
117 set formatlistpat=^\\s*\\*\ \\s*
118 set formatoptions+=onj
122 set spelllang=ru,en_gb
123 highlight SpellBad cterm=inverse ctermfg=red ctermbg=black
127 let g:netrw_banner = 0
128 let g:netrw_bufsettings = "noma nomod nowrap ro nobl"
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>
146 let g:sh_no_error = 1
148 nmap <space> f<space>
149 vmap <space> I<space><ESC>gv
153 nmap <leader>p "_diwP
155 nnoremap <leader>d "_d
156 vnoremap <leader>d "_d
164 nmap <F2> :set wrap!<CR>:set wrap?<CR>
165 nmap <Tab> :buffers<CR>:buffer<Space>
166 nmap <silent> <Home> :registers<CR>
167 nmap <leader>' yiwciw"<C-r>""<ESC>
168 nmap <leader>h1 yypVr=o
169 nmap <leader>sc 024i-<ESC>a >8 <ESC>24a-<ESC>
170 nmap <leader><C-]> :vertical wincmd ]<CR>
175 command! -bar -nargs=? -bang Tmp :silent vnew<bang>|setlocal buftype=nofile bufhidden=hide noswapfile buflisted filetype=<args> modifiable