vimrc example

This is a nice vi / vim color schema

 

Edit ~/.vimrc

set cindent
set shiftwidth=3
set tabstop=3
set expandtab
set ruler
” some colors: “white on black”
hi normal ctermfg=white ctermbg=black guifg=white guibg=black
hi nontext ctermfg=blue ctermbg=black guifg=blue guibg=black
” Syntax Hilighting
syntax on
set nowrap

” enables real tabs for Makefiles only
augroup Makefile
au!
au BufReadPre Makefile set noexpandtab
augroup END

” vim -b : edit binary using xxd-format!
augroup Binary
au!
au BufReadPre *.bin let &bin=1
au BufReadPost *.bin if &bin | %!xxd
au BufReadPost *.bin set ft=xxd | endif
au BufWritePre *.bin if &bin | %!xxd -r
au BufWritePre *.bin endif
au BufWritePost *.bin if &bin | %!xxd
au BufWritePost *.bin set nomod | endif
augroup END

 

some ref.

http://vim.wikia.com/wiki/Indenting_source_code

One thought

Leave a Reply

Your email address will not be published. Required fields are marked *

VAMOVE *

*