set mousemodel=popup
set number
"set pastetoggle=<f2>
-set path=.,,**,C:\programs\IAR\\\ System\EWB_V850_V360\common\bin
set printoptions=paper:letter
set scrolloff=1
set shiftround
set wildmode=longest:full,full
set wildignore+=tags,.*.un~,*.pyc
set winaltkeys=no
+set shell=/bin/bash
+set path=.,,**,C:\programs\IAR\\\ System\EWB_V850_V360\common\bin
-"if !has("gui_running") && $display == '' || !has("gui")
-" set mouse=
-"endif
-"
"set makeprg=cmake\ --build\ .
" Visual studio 2013
"set errorformat=\ %#%f(%l):\ %m
"set errorformat=%.%#>\ %#%f(%l)\ :\ %m
"
" IAR compiler
-set makeprg=vim-iarbuild.cmd
-set errorformat=%f(%l)\ :\ %m
+if executable('vim-iarbuild.cmd')
+ set makeprg=vim-iarbuild.cmd
+ set errorformat=%f(%l)\ :\ %m
+endif
+
+if executable('ag')
+ set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp
+ set grepformat^=%f:%l:%c:%m " file:line:coloumn:message
+endif
"syn match pythonDefStatement /^\s*\%(def\|class\)/
" \ nextgroup=pythonFunction skipwhite
let g:netrw_banner = 0
let g:netrw_sort_sequence = '[\/]$,*'
-"let g:ctrlp_map = '<c-p>'
-"let g:ctrlp_cmd = 'CtrlP'
-"let g:ctrlp_working_path_mode = 'ra'
"let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
"let g:markdown_syntax_conceal = 0
-" %s is replaced with fzf command
-"let g:fzf_launcher = 'xterm -e bash -ic %s'
-"let g:fzf_launcher = "in_a_new_term_function %s"
"for airline
-"let g:airline#extensions#tabline#enabled = 1
+let g:airline#extensions#tabline#enabled = 1
-"for ack.vim
-"if executable('rg')
-" let g:ackprg = 'rg --path-separator="//"'
-"endif
-if executable('ag')
- let g:ackprg = 'ag --vimgrep --skip-vcs-ignores --path-to-ignore ~/.ignore --cpp'
-endif
let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
" }}}2
" section: commands {{{1
"-----------------------
-set shell=/bin/bash
if has("cscope")
set nocscopetag
"
let mapleader = ","
+" Grep the word under cursor
+nnoremap <leader>* :silent grep <cword> \| copen<CR><C-l> " <C-l> redraws the screen
" Quickly edit/reload the vimrc file
nmap <silent> <leader>ev :e $MYVIMRC<CR>