Skip to content

Instantly share code, notes, and snippets.

@settipalli
Created April 16, 2012 17:58
Show Gist options
  • Save settipalli/2400355 to your computer and use it in GitHub Desktop.
Save settipalli/2400355 to your computer and use it in GitHub Desktop.
VIM configuration
call pathogen#infect()
syntax on
filetype plugin indent on " load filetype plugins/indent settings
" General
set autochdir " always switch to the current file directory
set incsearch " highlight as you type your search phrase
set laststatus=2 " always show the status line
set number " turn on line numbers
set showcmd " show the commad being typed, e.g. ctrl+y
set showmatch " show matching brackets
set expandtab " avoid using real tabs and replace them with space
" text formatting/layout
set ignorecase " case insensitive
set shiftwidth=4 " auto-indent amount when using cindent, >>, << and stuff like that
set softtabstop=4 " when hitting tab or backspace, how many spaces
set tabstop=8 " real tabs should be 8, and they will show with set list on
set smartcase " if there are caps, go case-sensitive
set infercase " case inferred
" folding
set foldenable " turn on folding
set foldmarker={,} " fold C style code (only use this as default if you use a high foldlevel
set foldmethod=marker " fold on the marker
set foldlevel=100 " don't autofold anything (but I can still fold manually)
set foldopen=block,hor,mark,percent,quickfix,tog " what movements open folds
" file/file type specific changes
" Autocommands
" HTML, CSS - set tab size to 2
au BufRead,BufNewFile *.html,*.htm,*.css set shiftwidth=2
au BufRead,BufNewFile *.html,*.htm,*.css set softtabstop=2
" source: http://vi-improved.org/vimrc.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment