set path=.,,**
set sessionoptions-=options
+" keyboard
+set backspace=indent,eol,start
+let mapleader = ","
+set ttimeoutlen=10
+set winaltkeys=no
+set mouse=a
+set mousemodel=extend
+set noerrorbells
+set visualbell
+
+" colors and fonts
+set t_Co=256
+set background=dark
+highlight LineNr ctermfg=grey
+let &t_ti.="\e[1 q"
+let &t_SI.="\e[5 q"
+let &t_EI.="\e[1 q"
+let &t_te.="\e[0 q"
+
" files
set fileformats=unix,dos,mac
set fileignorecase
" buffers
silent !mkdir -p ~/.vim/undo
-set viminfo+=n~/.vim/viminfo
-set undodir=~/.vim/undo
set undofile
+set undodir=~/.vim/undo
+set viminfo+=n~/.vim/viminfo
set nohidden
set nobackup
set noswapfile
set shortmess=aoOtI
set history=1000
-" keyboard
-set backspace=indent,eol,start
-set ttimeout
-set ttimeoutlen=100
-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_ti.="\e[1 q"
-let &t_SI.="\e[5 q"
-let &t_EI.="\e[1 q"
-let &t_te.="\e[0 q"
-highlight LineNr ctermfg=grey
-
" grep
set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc
set grepformat^=%f:%l:%c:%m " file:line:coloumn:message
" matchit
packadd matchit
-
-let mapleader = ","
-
" Normal mode Mappings
nnoremap <c-h> <c-w><c-h>
nnoremap <c-j> <c-w><c-j>
" Command aliases
cnoreabbrev w!! w !sudo tee "%"
-" autocommands
+" Autocommands
augroup filetype
au!
au bufnewfile,buffilepre,bufread *.md set filetype=markdown
augroup END
augroup vimrc
+ au!
au bufwritepost ~/.vim/gvimrc source %
au bufwritepost ~/.vim/vimrc source %
au bufwritepost ~/.vim/vimrc.local source %
augroup END
-
" local settings
if filereadable(expand('~/.vim/vimrc.local'))
source ~/.vim/vimrc.local