set laststatus=2

set number
set encoding=utf8
set ffs=unix,dos,mac
set nobackup
set nowb
set noswapfile

set shiftwidth=4
set tabstop=4
set expandtab

set lcs=trail:·,tab:»·
set list
set ruler
set so=7
set ignorecase
set smartcase
set incsearch
set hlsearch
set showmatch
set modeline

set ai "Auto indent
set si "Smart indent
set nowrap "Don't wrap lines
syntax on
set background=dark
colors echidna

set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_cpp_compiler = 'g++-5'
let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++ -I. -I..'
if ! has("gui_running")
  set t_Co=256
endif
set wildmenu
set showcmd
" Let's save undo info!
if !isdirectory($HOME."/.cache")
  call mkdir($HOME."/.cache", "", 0770)
endif
if !isdirectory($HOME."/.cache/vim")
  call mkdir($HOME."/.cache/vim", "", 0770)
endif
if !isdirectory($HOME."/.cache/vim/undo-dir")
  call mkdir($HOME."/.cache/vim/undo-dir", "", 0700)
endif
set undodir=~/.cache/vim/undo-dir
set undofile
