Created
April 3, 2012 09:30
-
-
Save samfoo/2290658 to your computer and use it in GitHub Desktop.
My .vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" The basics... | |
filetype on | |
filetype off | |
call pathogen#runtime_append_all_bundles() | |
filetype plugin indent on | |
set nocompatible | |
let mapleader = "\\" | |
set encoding=utf-8 | |
set autoindent | |
set cursorline | |
set ttyfast | |
set ruler | |
set number | |
set lazyredraw | |
set nobackup | |
" Tabs, spaces, wrapping (oh my!) | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set smarttab | |
set smartindent | |
set nowrap | |
set textwidth=0 | |
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2 | |
set list listchars=tab:»·,trail:· | |
" Colors of the rainbow and appearance | |
syntax on | |
colorscheme slate | |
set background=dark | |
set colorcolumn=+1 | |
hi ColorColumn guibg=gray13 | |
hi CursorLine guibg=gray13 | |
" I hateses the white bg/red fg | |
hi PreProc guifg=salmon guibg=grey15 ctermfg=red | |
" Don't insert a comment after CR | |
set formatoptions-=r | |
set guifont=Bitstream\ Vera\ Sans\ Mono:h14 | |
" Hide the toolbar in macvim | |
if has("gui_running") | |
set guioptions=egmrt | |
endif | |
" Searching | |
set hlsearch | |
set incsearch | |
set ignorecase | |
set smartcase | |
noremap <C-N> <Esc>:noh<CR> | |
" Buffers | |
noremap <Leader>w <Esc>:bd<CR> | |
" Folding | |
noremap <C-D> za | |
" Movement | |
set scrolloff=3 | |
set sidescrolloff=5 | |
" j and k should both behave with wrapped lines. | |
noremap j gj | |
noremap k gk | |
" Annoying commands are annoying | |
nnoremap K <nop> | |
set laststatus=2 | |
set esckeys | |
" So many files to ignore... | |
set wildmenu | |
set wildmode=list:longest | |
set wildignore+=.hg,.git,.svn | |
set wildignore+=*.jpg,*.bmp,*.gif,*.png,*.jpeg | |
set wildignore+=*.jar,*.o,*.obj,*.exe,*.dll,*.manifest,*.class | |
set wildignore+=*.sw? | |
set wildignore+=*.DS_Store | |
set wildignore+=*.pyc | |
" Resize splits when the window is resized | |
au VimResized * exe "normal! \<c-w>=" | |
autocmd BufRead *.rhtml set filetype=eruby | |
autocmd BufRead *.ru set filetype=ruby | |
autocmd BufRead *.erb set filetype=eruby | |
" Abbreviations (yes, I went there) | |
iabbrev ldis ಠ_ಠ | |
" Custom commands | |
command Tidy :exec ":%! tidy -xml -i -q" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment