Home > HowTo, Linux > vimrc example

vimrc example

October 16th, 2013 Leave a comment Go to comments

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

Categories: HowTo, Linux Tags: , , ,
  1. November 12th, 2013 at 01:41 | #1

    I’m happy that you shared this helpful information with us. Please stay us up to date like this. Thank you for sharing.

  1. No trackbacks yet.

VAMOVE *

*