Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

97 lines (75 sloc) 2.164 kb
set nocompatible
" Pathogen *****************************************************************
call pathogen#infect()
syntax enable
set background=light
set number
set ruler
" Set encoding
set encoding=utf-8
" Whitespace stuff
set wrap
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set list listchars=tab:\ \ ,trail:·
set smartindent
" Searching
set hlsearch
set incsearch
set ignorecase
set smartcase
" Tab completion
set wildmode=list:longest,list:full
set wildignore+=*.o,*.obj,.git,*.rbc,*.class,.svn,vendor/gems/*
" Status bar
set laststatus=2
" File opening/handling
" (http://stackoverflow.com/questions/1708623/opening-files-in-the-same-folder-as-the-current-file-in-vim)
map ,e :e <C-R>=expand("%:p:h") . "/" <CR>
map ,t :tabe <C-R>=expand("%:p:h") . "/" <CR>
map ,s :split <C-R>=expand("%:p:h") . "/" <CR>
" Colors
let g:solarized_termcolors=256
let &t_Co=256 " 256 colors
colorscheme solarized
" Disable arrow keys
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
" Let me edit my crontab!
" (http://tim.theenchanter.com/2008/07/crontab-temp-file-must-be-edited-in.html)
set backupskip=/tmp/*,/private/tmp/*
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" load the plugin and indent settings for the detected filetype
filetype plugin indent on
" Highlight the 80th column
set colorcolumn=80
" Plugins ******************************************************************
" NERDCommenter
let NERDDefaultNesting = 0
let NERDRemoveExtraSpaces = 1
let NERDSpaceDelims = 1
" vim-powerline
let g:Powerline_symbols = 'fancy'
" Ruby
if !empty($MY_RUBY_HOME)
let g:ruby_path = join(split(glob($MY_RUBY_HOME.'/lib/ruby/*.*')."\n".glob($MY_RUBY_HOME.'/lib/ruby/site_ruby/*'),"\n"),',')
endif
" Functions *******************************************************************
" Remove trailing whitespaces in files
fun! <SID>StripTrailingWhitespaces()
let l = line(".")
let c = col(".")
%s/\s\+$//e
%s/\t/ /ge
call cursor(l, c)
endfun
autocmd BufWritePre * :call <SID>StripTrailingWhitespaces()
Jump to Line
Something went wrong with that request. Please try again.