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 {{{
109 let g:fugitive_git_executable = "LANG=en.UTF-8 git"
110 nmap <F7> "cyiw:execute "Gvsplit " . @c<CR>zR
111 nmap <F9> :diffupdate<CR>:syntax off<CR>:syntax on<CR>
114 " *-lists indentation and formatting {{{
116 set formatlistpat=^\\s*\\*\ \\s*
120 autocmd BufEnter * let &titlestring = expand("%:t")
124 let g:netrw_banner = 0
125 let g:netrw_bufsettings = "noma nomod nowrap ro nobl"
131 nmap <space> f<space>
132 vmap <space> I<space><ESC>gv
136 nmap <leader>p "_diwP
141 nnoremap <leader>d "_d
142 vnoremap <leader>d "_d
150 nmap <Tab> :buffers<CR>:buffer<Space>
151 nmap <silent> <Home> :registers<CR>
152 nmap <leader>' yiwciw"<C-r>""<ESC>
153 nmap <leader>h1 yypVr=o
154 nmap <leader>72 :set textwidth=72
155 nmap <leader>sc 024i-<ESC>a >8 <ESC>24a-<ESC>
156 nmap <leader><C-]> :vertical wincmd ]<CR>
160 imap <F1> <C-O>:help!<CR>
162 nmap <leader>sp :setlocal spell spelllang=ru,en_gb
163 highlight SpellBad cterm=inverse ctermfg=red ctermbg=black
170 command! -bar -nargs=? -bang Tmp :silent vnew<bang>|setlocal buftype=nofile bufhidden=hide noswapfile buflisted filetype=<args> modifiable