let &t_te.="\e[0 q"
highlight LineNr ctermfg=grey
-" make
-"set makeprg=cmake\ --build\ .
-"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
set grepformat^=%f:%l:%c:%m " file:line:coloumn:message
" Normal mode Mappings
nnoremap <leader>* :silent grep <cword> \| copen<CR><C-l>
-nnoremap <Leader>t :tags<CR>
nnoremap <C-h> <C-w><C-h>
nnoremap <C-j> <C-w><C-j>
nnoremap <C-k> <C-w><C-k>
nnoremap <C-l> <C-w><C-l>
nnoremap <C-n> :bnext<CR>
-nnoremap <C-p> :bNext<CR>
+nnoremap <C-p> :bprev<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>
" CtrlP
packadd ctrlp.vim
-let g:ctrlp_map = '<c-p>'
+let g:ctrlp_map = '<Leader>p'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
"let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
nnoremap <Leader>b :CtrlPBuffer<CR>
nnoremap <Leader>m :CtrlPMRU<CR>
+" matchit
+packadd matchit
-" autocommands
-autocmd bufreadpost quickfix nnoremap <buffer> <CR> <CR>
+
+" autocommands
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
+ au!
+ au bufnewfile,buffilepre,bufread *.md set filetype=markdown
+ au bufnewfile,buffilepre,bufread *.gradle set filetype=groovy
+ au bufnewfile,buffilepre,bufread *.json set filetype=json
+ au bufnewfile,buffilepre,bufread *.yml set filetype=yaml
augroup END
augroup saveall
- autocmd!
- autocmd focuslost * wall
+ au!
+ au focuslost * wall
augroup END
augroup numbertoggle
- autocmd!
- autocmd bufenter,focusgained,insertleave * set relativenumber
- autocmd bufleave,focuslost,insertenter * set norelativenumber
+ au!
+ au bufenter,focusgained,insertleave * set relativenumber
+ au 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 %
+ au bufwritepost ~/.vim/gvimrc source %
+ au bufwritepost ~/.vim/vimrc source %
+ au bufwritepost ~/.vim/vimrc.local source %
augroup END
" local