set titlestring=vim:\ %f
" folding
-set foldmethod=syntax
+"set foldmethod=indent
set foldopen+=jump,search
-set foldclose=all
+"set foldclose=all
" keyboard
let mapleader = ","
highlight normal ctermbg=black ctermfg=white
highlight linenr ctermfg=grey
-" fonts
+" fonts and chars
set list
if has('multi_byte') && &encoding ==# 'utf-8'
let &listchars = 'tab:Ã\83Â\83Ã\82Â\83Ã\83Â\82Ã\82¢Ã\83Â\83Ã\82Â\82Ã\83Â\82Ã\82Â\96Ã\83Â\83Ã\82Â\82Ã\83Â\82Ã\82¸ ,extends:Ã\83Â\83Ã\82Â\83Ã\83Â\82Ã\82¢Ã\83Â\83Ã\82Â\82Ã\83Â\82Ã\82Â\9dÃ\83Â\83Ã\82Â\82Ã\83Â\82Ã\82¯,precedes:Ã\83Â\83Ã\82Â\83Ã\83Â\82Ã\82¢Ã\83Â\83Ã\82Â\82Ã\83Â\82Ã\82Â\9dÃ\83Â\83Ã\82Â\82Ã\83Â\82Ã\82®,nbsp:Ã\83Â\83Ã\82Â\83Ã\83Â\82Ã\82Â\82Ã\83Â\83Ã\82Â\82Ã\83Â\82Ã\82±'
let &t_SI.="\e[5 q"
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"
-"set errorformat=\ %#%f(%l)%#:\ %#%t%[A-z]%#\ :\ %m
-"set errorformat+=%#:%#\ %[A-Z\ ]%#%n:%#
" make
-" visual studio
-set makeprg=cmake
-" filename(line): error|warning|fatal error C0000: message
-set errorformat=\ %#%f(%l)%#:\ %#%t%[A-z]%#\ %[A-Z\ ]%#%n:\ %m
-" filename(line): error|warning|fatal : message
-"set errorformat=\ %#%f(%l)%#:\ %#%t%[A-z]%#\ :\ %m
-
-" IAR compiler
-"set makeprg=vim-iarbuild.cmd
-"set errorformat=%f(%l)\ :\ %m
-
-" Doxygen
-"set makeprg=doxygen
-"set errorformat+=%f:%l:\ %m
-
-
+let mycomp="msvc"
+
+if mycomp == "msvc"
+ compiler msvc
+ let &errorformat="%f(%l) : %t%*\\D%n: %m,%*[^\"]\"%f\"%*\\D%l: %m,%f(%l) : %m,%*[^ ] %f %l: %m,%f:%l:%c:%m,%f(%l):%m,%f|%l| %m"
+ set makeprg=cmake
+elseif mycomp == "doxygen"
+ set errorformat+=%f:%l:\ %m
+ set makeprg=doxygen
+elseif mycomp == "iar"
+ set errorformat=%f(%l)\ :\ %m
+ set makeprg=vim-iarbuild.cmd
+endif
" grep
+" file:line:coloumn:message
+set grepformat^=%f:%l:%c:%m
set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc
-set grepformat^=%f:%l:%c:%m " file:line:coloumn:message
nnoremap <silent> <leader>* :grep <cword> \| copen<cr><c-l>
" Netrw
tnoremap <C-k> <C-\><C-n><C-w>k
tnoremap <C-l> <C-\><C-n><C-w>l
+" My functions
+function! SetCmakeRoot(path)
+ let &makeprg="cmake ". a:path
+endfunction
+
" Autocommands
if has('autocmd')
augroup filetypes