-syntax on
+set nocompatible
filetype plugin indent on
+syntax enable
-" General options
+" Use :help 'option' to see the documentation for the given option.
+set shell=/bin/bash
set path=.,,**,C:\programs\IAR\\\ System\EWB_V850_V360\common\bin
-set fileformats=unix,dos,mac
set printoptions=paper:letter
-set shell=/bin/bash
-set backspace=2
-set breakindent showbreak=\ +
-set clipboard=unnamed
-
-set guioptions+=a
-"set guioptions-=m "menu bar
-set guioptions-=T "toolbar
-set guioptions-=r "scroolbar
-
-set complete-=i " searching includes can be slow
-set history=200
-set incsearch " incremental search
-set lazyredraw
-set linebreak
-set mouse=nvi
-set mousemodel=popup
+set fileformats=unix,dos,mac
+set history=1000
+set tabpagemax=50
+set t_Co=256
+set background=dark
+set updatetime=250
+set wildignore+=tags,.*.un~,*.pyc
set number
-set scrolloff=1
+set sessionoptions-=options
+set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
+set formatoptions+=j
+setglobal tags-=./tags tags-=./tags; tags^=./tags;
+set lazyredraw
set shiftround
set shortmess=aoOtI
-set showmatch
-set sidescrolloff=5
-set smartcase
-"setglobal tags=./tags;
-set timeoutlen=500 " leader key timeout
-set ttimeoutlen=50 " make esc work faster
-set visualbell
-set virtualedit=block
-set updatetime=250
-set winaltkeys=no
-set wildignore+=tags,.*.un~,*.pyc
-" folding
-set foldmethod=syntax
-set foldlevel=1
-set foldclose=all
-set foldopen+=jump
+" edit
+set virtualedit=block
+set clipboard=unnamed
" buffers
silent !mkdir -p ~/.vim/undo
-set viminfo+=n~/./vim/viminfo
+set viminfo+=n~/.vim/viminfo
set undodir=~/.vim/undo
set undofile
set nohidden
set autowrite
set autowriteall
-" command and status line
-set showcmd
-set cmdheight=2
+" indent
+set autoindent
+set smarttab
+set breakindent showbreak=\ +
+set linebreak
+
+" search
+set incsearch
+set ignorecase
+set smartcase
+set showmatch
+set complete-=i
+
+" command and status line
set laststatus=2
+set ruler
set wildmenu
set wildmode=longest:full,full
+set showcmd
+set cmdheight=2
+
+" scroll
+set scrolloff=1
+set sidescrolloff=5
+set display+=lastline
+
+" fold
+set foldmethod=syntax
+set foldlevel=1
+set foldclose=all
+set foldopen+=jump,search
+
+" mouse
+set mouse=a
+set mousemodel=extend
+
+" keyboard
+set backspace=indent,eol,start
+set ttimeout
+set ttimeoutlen=100
+set timeout
+set timeoutlen=500
+set winaltkeys=no
+set visualbell
+
+" gvim
+if (has("gui_running"))
+ highlight Normal guibg=black guifg=white
+ set guioptions+=a
+ set guioptions-=m "menu bar
+ set guioptions-=T "toolbar
+ set guioptions-=r "scroolbar
+ set encoding=utf-8
+ if exists("&guifont")
+ if has("mac")
+ set guifont=monaco:h11
+ elseif has("unix")
+ set guifont=inconsolata\ 11
+ elseif has("win32")
+" set guifont=consolas:h11,courier\ new:h10
+ set guifont=consolas:h10:cANSI:qDRAFT
+ endif
+ endif
+endif
+
+" block cursor in normal mode
+let &t_ti.="\e[1 q"
+let &t_SI.="\e[5 q"
+let &t_EI.="\e[1 q"
+let &t_te.="\e[0 q"
" make
"set makeprg=cmake\ --build\ .
" Normal mode Mappings
nnoremap <leader>* :silent grep <cword> \| copen<CR><C-l>
nnoremap <Leader>t :tags<CR>
-nnoremap <space> za
nnoremap <C-h> <C-w><C-h>
nnoremap <C-j> <C-w><C-j>
nnoremap <C-k> <C-w><C-k>
nnoremap <C-n> :bnext<CR>
nnoremap <C-p> :bNext<CR>
-" Insert Mappings
+" Insert mode Mappings
+inoremap <C-U> <C-G>u<C-U>
-" Command Mappings
+" Command mode Mappings
" Command aliases
cnoreabbrev w!! w !sudo tee "%"
nnoremap <Leader>m :CtrlPMRU<CR>
-" Colors and Fonts
-highlight Normal guibg=black guifg=white
-set background=dark
-set t_Co=256
-if (&t_Co > 2 || has("gui_running"))
- if exists("&guifont")
- if has("mac")
- set guifont=monaco:h11
- elseif has("unix")
- set guifont=inconsolata\ 11
- elseif has("win32")
-" set guifont=consolas:h11,courier\ new:h10
- set guifont=consolas:h10:cANSI:qDRAFT
- endif
- endif
-endif
-
-" block cursor in normal mode
-let &t_ti.="\e[1 q"
-let &t_SI.="\e[5 q"
-let &t_EI.="\e[1 q"
-let &t_te.="\e[0 q"
" autocommands
autocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>