if has("win32")
let b:vim_conf_dir = $HOME.'\vimfiles'
endif
+set nocompatible
if isdirectory( b:vim_conf_dir . '/tmp/') == 0
call mkdir(b:vim_conf_dir.'/tmp/', 'p', 0700)
endif
-set nocompatible
"load plugins
if filereadable(b:vim_conf_dir . '/plugins.vundel.vim')
set lazyredraw
set autoindent
+set smartindent
set expandtab
set tabstop=4
set softtabstop=4
nnoremap <Leader>i a'" << << "' <Esc>6hi
nnoremap <Leader>a a'{}' <Esc>2hi
nnoremap <Leader>A a'"+ +"' <Esc>4hi
-
-nnoremap <Leader>A a'"+ +"' <Esc>4hi
+autocmd FileType cpp nnoremap <Leader>a a'"<< <<"' <Esc>5hi
" see :h restore-position
nnoremap <Leader>= msgg=G`s
hi Visual guifg=White guibg=Blue gui=bold
set diffopt+=vertical
-set diffopt+=iwhite
+"set diffopt+=iwhite
set diffopt+=algorithm:patience
"jump to next diff and center line
noremap <leader>n ]cz.
noremap <leader>p [cz.
+if has ('win32')
+ set guifont=DejaVu_Sans_Mono:h11:cANSI:qDRAFT
+endif
if &diff
" ignore whitespace
set diffopt+=vertical
syntax off
highlight DiffText term=reverse cterm=reverse ctermfg=214 ctermbg=234 gui=reverse guifg=lightgreen guibg=DarkGreen
" go fullscreen:
- autocmd GuiEnter * simalt ~x
+ if has ('win32')
+ autocmd GuiEnter * simalt ~x
+ set guifont=DejaVu_Sans_Mono:h8:cANSI:qDRAFT
+ endif
" make all diff windows the same size
autocmd VimResized * wincmd =
autocmd VimEnter * 2wincmd w
autocmd VimEnter * syntax off
autocmd VimEnter * set guioptions+=b
set relativenumber!
- set guifont=DejaVu_Sans_Mono:h8:cANSI:qDRAFT
set number
else
if has("gui_running")
set lines=999 columns=120
- set guifont=DejaVu_Sans_Mono:h12:cANSI:qDRAFT
- " if has("gui_macvim")
- " set guifont=Menlo\ Regular:h14
- " elseif has("gui_win32")
- " set guifont=Consolas:h11:cANSI
- " else
- " set guifont=Inconsolata\ 12
- " endif
endif
" from /etc/vim/vimrc (restore last editing position)
if has("autocmd")
endif
+
" remove currently unused fugitive buffers:
autocmd BufReadPost fugitive://* set bufhidden=delete
-autocmd GuiEnter * simalt ~x
-
" reset terminal colors after vim leaves
"if !has("gui_running")
" au VimLeave * !echo -ne "\033[0m"
set lbr
endif
-hi CursorLineNr term=underline cterm=underline ctermfg=White ctermbg=darkBlue guibg=darkyellow
-hi clear Cursorline
-"hi CursorLine gui=underline term=underline cterm=underline
+hi CursorLineNr ctermbg=black guibg=black
+hi CursorLine ctermbg=black guibg=black
augroup CursorLine
- au!
- au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
- au WinLeave * setlocal nocursorline
+ au!
+ au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
+ au WinLeave * setlocal nocursorline
augroup END
packadd! matchit