.vimrc-alt (922B)
1 " disable vi compatibility 2 set nocompatible 3 4 " set UTF-8 encoding 5 set enc=utf-8 6 set fenc=utf-8 7 set termencoding=utf-8 8 9 " use indentation of previous line 10 set autoindent 11 12 " use intelligent indentation for C 13 set smartindent 14 15 " configure tabwidth and insert spaces instead of tabs 16 set tabstop=4 " tab width is 4 spaces 17 set shiftwidth=4 " indent also with 4 spaces 18 set expandtab " expand tabs to spaces 19 20 set cc=80 21 22 " turn syntax highlighting on 23 set t_Co=256 24 syntax on 25 " :color shine 26 :colorscheme jellybeans 27 28 " turn line numbers on 29 set number 30 31 " highlight matching braces 32 set showmatch 33 34 " Enhanced keyboard mappings 35 " 36 " in normal mode F2 will save the file 37 nmap <F2> :w<CR> 38 39 " in insert mode F2 will exit insert, save, enters insert again 40 imap <F2> <ESC>:w<CR>i 41 42 " switch between header/source with F4 43 map <F4> :e %:p:s,.h$,.X123X,:s,.c$,.h,:s,.X123X$,.c,<CR> 44 45 map <F5> :make<CR> 46 map <F6> :make clean all<CR>