Skip to content

Instantly share code, notes, and snippets.

@mrmrs
Created July 1, 2013 18:45
Show Gist options
  • Save mrmrs/5903458 to your computer and use it in GitHub Desktop.
Save mrmrs/5903458 to your computer and use it in GitHub Desktop.
vimrc
" Smarter defaults
set nocompatible " Uses vim vs vi settings must be set first
syntax on " Turn on syntax highlighting for recognized filetypes
set history=1000 " Default is 20, I'd rather set this to ∞
set nofoldenable " Don't fold shit
set wildmenu " List outoptions for autocompleting commmands
set number " Adds line numbers
set visualbell " Never hear beep again === happy
set ic " Ignore case when searching
" Swap
set noswapfile
set nobackup
set nowb
silent !mkdir ~/.vim/backups > /dev/null 2>&1
set undodir=~/.vim/backups
set undofile
" Tabs / Spacing / Indenting
set autoindent
set smarttab
set shiftwidth=2
set softtabstop=2
set tabstop=2
set expandtab
set title " Sets file name into window title
set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
" Recognize scss - probs doing this wrong
au BufEnter *.css set nocindent
au BufLeave *.css set cindent
au BufEnter *.scss set nocindent
au BufLeave *.scss set cindent
autocmd BufNewFile,BufRead *.scss set ft=scss.css
autocmd BufRead,BufNewFile *.erb set filetype=eruby.html
" CUSTOM MAPPINGS
" Tabs
nnoremap th :tabfirst<CR>
nnoremap tj :tabnext<CR>
nnoremap tk :tabprev<CR>
nnoremap tl :tablast<CR>
nnoremap ff :CtrlP<CR>
nnoremap -- :GundoToggle<CR>
hi LineNr ctermfg=darkgrey ctermbg=black
filetype plugin on
filetype indent on
set smartindent
map <Esc><Esc> :w<CR>
map fj :execute "vimgrep /" . expand("<cword>") . "/j **" <Bar> cnext<CR>
map cn :cn<CR>
call pathogen#infect()
@mrmrs
Copy link
Author

mrmrs commented Jul 1, 2013

Plugins:

FuzzyFinder
L9
ctrlp.vim
delimitMate
gundo.vim
scss-syntax.vim
snpts
supertab
tlib_vim
vim-addon-mw-utils
vim-fugitive
vim-html5
vim-javascript
vim-markdown
vim-multiple-cursors
vim-rails
vim-snipmate
vimroom
zencoding-vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment