Useful info

.vimrc

set encoding=utf-8
" vim doesn't recognise konsole's colour support. this tells vim to use 256 colours
set t_Co=256
" sets the colour scheme (recognised by CApprox)
colorscheme darkspectrum
" turn on line numbers
set number
" tabs and (auto)indents are 4 spaces
set tabstop=4
set shiftwidth=4
" make tabs spaces
set expandtab
" guess the filetype and indent accordingly
filetype indent on
" behave like every other text editor on the planet and allow switching from unsaved buffers
set hidden
" for search/replace (and ..?) be case insensitive unless one of the letters is a capital
set ignorecase smartcase
" find while typing and highlight matches
set incsearch hlsearch
" allow :w!! to save a file as sudo (prompts for password)
cmap w!! %!sudo tee > /dev/null %
" show the current command in the status bar
set showcmd
" automatically change vim's working directory to the dir of the currently open buffer
set autochdir
" automatically insert fold according to syntax
set foldmethod=syntax
" ... but have folds open by default
set nofoldenable
" insert leaders for multiline comments
set formatoptions+=rco

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>