" files
set fileformats=unix,dos,mac
set fileignorecase
-set wildignore+=tags,.*.un~,*.pyc
setglobal tags-=./tags tags-=./tags; tags^=./tags;
" copy and paste
set showmatch
set complete-=i
-" command and status line
-set laststatus=2
-set ruler
-set wildmenu
-set wildmode=longest:full,full
-set showcmd
-set cmdheight=2
-set shortmess=aoOtI
-set history=1000
-
" scroll
set scrolloff=1
set sidescrolloff=5
set foldclose=all
set foldopen+=jump,search
-" mouse
-set mouse=a
-set mousemodel=extend
+" command line
+set wildmenu
+set wildmode=longest:full,full
+set wildignore+=tags,*.pyc,*.jpg,*.png,*.gif
+set showcmd
+set ruler
+set laststatus=2
+set cmdheight=2
+set shortmess=aoOtI
+set history=1000
" keyboard
set backspace=indent,eol,start
set timeout
set timeoutlen=500
set winaltkeys=no
+set mouse=a
+set mousemodel=extend
+set noerrorbells
set visualbell
+
" colors and fonts
set t_Co=256
set background=dark
let &t_te.="\e[0 q"
highlight LineNr ctermfg=grey
-" gvim
-if (has("gui_running"))
- highlight Normal guibg=black guifg=white
- highlight LineNr guifg=grey
- set guioptions+=a
- set guioptions-=m "menu bar
- set guioptions-=T "toolbar
- set guioptions-=r "scroolbar
- set encoding=utf-8
- if exists("&guifont")
- if has("mac")
- set guifont=monaco:h11
- elseif has("unix")
- set guifont=inconsolata\ 11
- elseif has("win32")
-" set guifont=consolas:h11,courier\ new:h10
- set guifont=consolas:h10:cANSI:qDRAFT
- endif
- endif
-endif
-
-
" make
"set makeprg=cmake\ --build\ .
-set makeprg=msbuild
-set errorformat=\ %#%f(%l):\ %m " Visual studio 2013
+"set makeprg=msbuild
+"set errorformat=\ %#%f(%l):\ %m " Visual studio 2013
"set errorformat=%.%#>\ %#%f(%l)\ :\ %m " Visual studio 2008
"set makeprg=vim-iarbuild.cmd " IAR compiler
"set errorformat=%f(%l)\ :\ %m
+set makeprg=doxygen
" grep
set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc
nnoremap <C-l> <C-w><C-l>
nnoremap <C-n> :bnext<CR>
nnoremap <C-p> :bNext<CR>
-" Press <CR> to turn off highlighting and clear any message already displayed.
-nnoremap <silent> <CR> :nohlsearch<Bar>:echo<CR>
+nnoremap <silent> <Leader>+ :exe "resize " . (winheight(0) * 3/2)<CR>
+nnoremap <silent> <Leader>- :exe "resize " . (winheight(0) * 2/3)<CR>
+nnoremap <silent> <CR> :nohlsearch<Bar>:echo<CR>
" Insert mode Mappings
inoremap <C-U> <C-G>u<C-U>
packadd editorconfig-vim
let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
let g:editorconfig_verbose = 1
-if has("win32")
- let g:EditorConfig_exec_path = "C:\programs\editorconfig\bin\editorconfig.exe"
-else
- let g:editorconfig_core_mode = "python_builtin"
-endif
+let g:editorconfig_core_mode = "python_builtin"
" CtrlP
packadd ctrlp.vim
" autocommands
-autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>
-autocmd bufnewfile,bufread *.md set filetype=markdown
-autocmd bufnewfile,bufread *.gradle set filetype=groovy
+autocmd bufreadpost quickfix nnoremap <buffer> <CR> <CR>
+
+augroup filetype
+ autocmd!
+ autocmd! bufnewfile,buffilepre,bufread *.md set filetype=markdown
+ autocmd bufnewfile,buffilepre,bufread *.gradle set filetype=groovy
+ autocmd bufnewfile,buffilepre,bufread *.json set filetype=json
+ autocmd bufnewfile,buffilepre,bufread *.yml set filetype=yaml
+augroup END
augroup saveall
autocmd!
- autocmd FocusLost * wall
+ autocmd focuslost * wall
augroup END
augroup numbertoggle
autocmd!
- autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
- autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
+ autocmd bufenter,focusgained,insertleave * set relativenumber
+ autocmd bufleave,focuslost,insertenter * set norelativenumber
+augroup END
+
+augroup vimrc
+ autocmd bufwritepost ~/.vim/gvimrc source %
+ autocmd bufwritepost ~/.vim/vimrc source %
+ autocmd bufwritepost ~/.vim/vimrc.local source %
augroup END
" local