From 4d23ad4cce8f04cf7ae770a1de3a5bfc5d311e7e Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Fri, 2 Sep 2016 11:18:20 -0600 Subject: added vimrc --- vimrc | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 vimrc diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..c038eb8 --- /dev/null +++ b/vimrc @@ -0,0 +1,73 @@ +let g:airline_powerline_fonts=1 +let g:neocomplete#enable_at_startup = 1 +set laststatus=2 +" set UTF-8 encoding +set enc=utf-8 +set fenc=utf-8 +set termencoding=utf-8 +" disable vi compatibility (emulation of old bugs) +set nocompatible +" use indentation of previous line +set autoindent +" use intelligent indentation for C +set smartindent +" configure tabwidth and insert spaces instead of tabs +set tabstop=4 " tab width is 4 spaces +set shiftwidth=4 " indent also with 4 spaces +set expandtab " expand tabs to spaces +" wrap lines at 120 chars. 80 is somewaht antiquated with nowadays displays. +set textwidth=120 +" turn syntax highlighting on +if $COLORTERM == 'rxvt' + set t_Co=256 +endif +syntax on +" let g:seoul256_background = 233 +" colorscheme seoul256 +"colorscheme wombat256mod +set background=dark +" turn line numbers on +set number +" highlight matching braces +set showmatch +" intelligent comments +set comments=sl:/*,mb:\ *,elx:\ */ + +" Enhanced keyboard mappings +" +" in normal mode F2 will save the file +nmap :w +" in insert mode F2 will exit insert, save, enters insert again +imap :wi +" switch between header/source with F4 +map :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp, +" recreate tags file with F5 +map :!ctags -R –c++-kinds=+p –fields=+iaS –extra=+q . +" create doxygen comment +map :Dox +" build using makeprg with +map :make +" build using makeprg with +map :make clean all +" goto definition with F12 +map +" in diff mode we use the spell check keys for merging +if &diff + ” diff settings + map ]c + map [c + map do + map dp + map :new:read !svn diff:set syntax=diff buftype=nofilegg +else + " spell settings + " :setlocal spell spelllang=en + " set the spellfile - folders must exist + " set spellfile=~/.vim/spellfile.add + map ]s + map [s +endif + +runtime bundle/unbundle/plugin/unbundle.vim +runtime! config/*.vim + -- cgit v1.2.3-70-g09d2