Skip to content

Instantly share code, notes, and snippets.

@blaxter
Created April 3, 2009 19:16
Show Gist options
  • Save blaxter/89915 to your computer and use it in GitHub Desktop.
Save blaxter/89915 to your computer and use it in GitHub Desktop.
~/.vimrc
runtime! macros/matchit.vim
runtime! debian.vim
colorscheme torte
syntax on
:highlight Normal guibg=Black guifg=White
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
endif
if has("autocmd")
filetype indent on
endif
filetype plugin indent on
set showcmd " Show (partial) command in status line.
set showmatch " Show matching brackets.
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set incsearch " Incremental search
set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes) in terminals
set history=1000
set cindent
set tabstop=4 " By default 4 indent spaces
set shiftwidth=4 " By default 4 indent spaces
set number " linenumber
set shiftround
set expandtab
set autochdir " cd into the current file you're editing
set autoindent
set title
set scrolloff=4 " Keep 4 lines above and below cursor
set smarttab
set nocompatible
set ruler
set hlsearch " highlight results of a search
" Un/Indent blocks with < >
vnoremap <TAB> >gv
vnoremap <S-TAB> <gv
augroup myfiletypes
" Clear old autocmds in group
autocmd!
" autoindent with two spaces, always expand tabs
autocmd FileType ruby,eruby,yaml set ts=2 sts=2 sw=2 et
augroup END
" Highlight useless whitespace
highlight RedundantWhitespace ctermbg=red guibg=red
match RedundantWhitespace /\s\+$\| \+\ze\t/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment