Skip to content

Instantly share code, notes, and snippets.

@benjamingeiger
Created June 13, 2011 18:48
Show Gist options
  • Save benjamingeiger/1023415 to your computer and use it in GitHub Desktop.
Save benjamingeiger/1023415 to your computer and use it in GitHub Desktop.
tanuki's vimrc
" Configure pathogen
call pathogen#runtime_append_all_bundles()
" Default color scheme
colorscheme vividchalk
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE
" General
let mapleader=","
let g:mapleader=","
" Enable filetype plugins
filetype plugin on
filetype indent on
" Reload vimrc on save
autocmd! bufwritepost .vimrc source ~/.vimrc
" Quick commands
" Quick save
nmap <leader>w :w!<cr>
" Strip CRs
noremap <Leader>M mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
" Text, tab, and indent stuff
set tabstop=8
set smarttab
set shiftwidth=8
set autoindent
set noexpandtab
set backspace=indent,eol,start
" User interface
syntax on
set laststatus=2
set statusline=%<%f\ %h%w%m%r%y%=L:%l/%L\ (%p%%)\ C:%c%V\ B:%o\ F:%{foldlevel('.')}
set number " Show line numbers
" set ruler " Show our position
set hlsearch " Highlight what we're searching for
set incsearch " Search incrementally
set showmatch " Blink matching brackets
set ignorecase " Case insensitive search
set smartcase
set magic " Turn on regex magic
" Left and right cursor keys wrap to next/previous line
set whichwrap+=<,>,h,l,[,]
" NERDTree configuration
let NERDTreeQuitOnOpen = 1
nnoremap <Leader>t :let NERDTreeQuitOnOpen = 1<bar>NERDTreeToggle<CR>
nnoremap <Leader>T :let NERDTreeQuitOnOpen = 0<bar>NERDTreeToggle<CR>
" EasyMotion configuration
let EasyMotion_leader_key = '<Leader>m'
" File type stuff
set ofu=syntaxcomplete#Complete
highlight Pmenu ctermbg=238 gui=bold
" -- old stuff under here
autocmd FileType ruby set tabstop=2
autocmd FileType ruby set shiftwidth=2
autocmd FileType ruby set expandtab
autocmd BufRead *.html.erb set filetype=eruby
autocmd BufRead *.rb set filetype=ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment