Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Vimrc
"-------------------------------------------------------------------[Vundle]----
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'kien/ctrlp.vim'
Bundle 'mileszs/ack.vim'
Bundle 'danchoi/ruby_bashrockets.vim'
Bundle 'duff/vim-bufonly'
Bundle 'ervandew/supertab'
Bundle 'jdevera/vim-protobuf-syntax'
Bundle 'leshill/vim-json'
Bundle 'Lokaltog/vim-powerline'
Bundle 'majutsushi/tagbar'
Bundle 'msanders/snipmate.vim'
Bundle 'Rykka/ColorV'
Bundle 'scrooloose/nerdcommenter'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/snipmate-snippets'
Bundle 'scrooloose/syntastic'
Bundle 'vim-ruby/vim-ruby'
Bundle 'vim-scripts/yaml.vim'
Bundle 'jamestomasino/actionscript-vim-bundle'
Bundle 'cespare/mxml.vim'
Bundle 'cespare/dtd.vim'
Bundle 'tpope/vim-fugitive'
Bundle 'tpope/vim-git'
Bundle 'tpope/vim-haml'
Bundle 'tpope/vim-markdown'
Bundle 'tpope/vim-rails'
Bundle 'tpope/vim-rake'
Bundle 'tpope/vim-bundler'
Bundle 'tpope/vim-repeat'
Bundle 'tpope/vim-surround'
Bundle 'tpope/vim-unimpaired'
Bundle 'vim-scripts/Align'
Bundle 'bronson/vim-trailing-whitespace'
Bundle 'vim-scripts/Io-programming-language-syntax'
Bundle 'edsono/vim-matchit'
Bundle 'kana/vim-textobj-user'
Bundle 'nelstrom/vim-textobj-rubyblock'
Bundle 'vim-scripts/vim-scala'
Bundle 'vim-scripts/scala.vim'
"colorschemes
Bundle 'altercation/vim-colors-solarized'
Bundle 'tomasr/molokai'
filetype plugin indent on
"------------------------------------------------------------------[General]----
set secure "locks down the exrc setting
set exrc "enable cwd .vimrc files
set nocompatible
set encoding=utf8
syntax on
set nowrap
set nofoldenable
set backspace=indent,eol,start
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set autoindent
set cinoptions=(s,m1,)200,j1,J1
set vb
set t_vb=""
set backup
set swapfile
set backupdir=/tmp
set directory=/tmp
set lazyredraw
set complete=.,w,k,b,u,t,i
set completeopt=menu
let mapleader=","
"-------------------------------------------------------------------[Layout]----
set number
set laststatus=2
"set ruler
set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
set listchars=tab:▶━,trail:⌴,extends:▶,precedes:
set splitbelow
set splitright
colorscheme molokai
syn on
silent! set colorcolumn=80
function! SyntaxItem()
return synIDattr(synID(line("."),col("."),1),"name")
endfunction
"--------------------------------------------------------------[Plugins]----
"let g:Powerline_symbols='fancy'
let g:SuperTabSetDefaultCompletionType="context"
let g:syntastic_javascript_checker="jshint"
let g:fugitive_github_domains = ['git.iamawesome.com']
let g:Powerline_dividers_override = ['', '', '', '']
call Pl#Theme#RemoveSegment('fileformat')
call Pl#Theme#RemoveSegment('fileencoding')
silent! sign define SyntasticError text=!>
silent! sign define SyntasticWarning text=W>
" Tagbar mappings
nnoremap <leader>tb :TagbarToggle<cr>
" NERDTree mappings
nnoremap <leader>ntt :NERDTreeToggle<cr>
nnoremap <leader>ntf :NERDTreeFind<cr>
" Ack.vim mappings
nnoremap <leader>fi :Ack --ruby
nnoremap <leader>f/ :AckFromSearch --ruby<cr>
nnoremap <leader>fq :cclose<cr>
nnoremap <leader>fo :copen<cr>
" Whitespace mappings
nnoremap <leader>fw :FixWhitespace<cr>
"---------------------------------------------------------------[Search]----
set hlsearch
set incsearch
set smartcase
set ignorecase
"-----------------------------------------------------------[Navigation]----
"set mouse=a
set hidden
set scrolloff=5
set scrolljump=5
set sidescrolloff=10
set sidescroll=1
set wildmenu
set showmatch
set matchtime=2
set cursorline
set cursorcolumn
"------------------------------------------------------[Custom Mappings]----
nnoremap <silent> <Tab> :wincmd w<cr>
nnoremap <silent> <S-Tab> :wincmd W<cr>
" Map esc key in insert mode to jk
"inoremap jk <esc>
"vnoremap jk <esc>
"inoremap <esc> <nop>
"vnoremap <esc> <nop>
" 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>
" Move around splits with <c-hjkl>
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l
" Move line up (keep cursor with line)
noremap <leader>k ddkP
" Move line down (keep cursor with line)
noremap <leader>j ddp
" Insert mode delete line
inoremap <c-d> <esc>ddi
" Insert mode uppercase word
inoremap <c-u> <esc>viwUi
" Beginning of line
noremap H ^
" End of line
noremap L $
" Insert line below
noremap <leader>o o<esc>k
" Insert line above
noremap <leader>O O<esc>j
" Insert line at top of file
noremap gO ggO
" Insert line at bottom of file
noremap go Go
" Go to file under cursor
noremap gf :e <cfile><cr>
" Unhighlight search
nnoremap <leader>/ :nohls<cr>
" Edit .vimrc in new vsplit
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
" Source .vimrc
nnoremap <leader>sv :source $MYVIMRC<cr>
" Symbolize word
nnoremap <leader>: viw<esc>bi:<esc>
" Wrap parens around def method args
nnoremap <leader>() ^welr(A)<esc>
" Reformat line
nnoremap <leader>l= V=
" Reformat paragraph
nnoremap <leader>p= vip=
function! PromoteToLet()
:normal! dd
" :exec '?^\s*it\>'
:normal! P
:.s/\(\w\+\) = \(.*\)$/let(:\1) { \2 }/
:normal ==
endfunction
:command! PromoteToLet :call PromoteToLet()
:map <leader>p :PromoteToLet<cr>
" Expand hashrocket
iabbrev hh =>
"---------------------------------------------------------------[Keymap]----
"set keymap=jocafa
"---------------------------------------------------------------------------
"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%[File Types]%%%%
"---------------------------------------------------------------------------
"-----------------------------------------------------------------[HTML]----
autocmd BufNewFile,BufRead *.htm,*.html set filetype=html.css.javascript
"------------------------------------------------------------------[CSS]----
autocmd BufNewFile,BufRead *.css,*.less set filetype=css
"-----------------------------------------------------------------[HAML]----
autocmd BufNewFile,BufRead *.haml set filetype=haml
autocmd FileType haml set makeprg=haml\ %:p\ %:p:s?haml?html?
"-----------------------------------------------------------------[Ruby]----
autocmd BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec,[rR]akefile,Thorfile,Capfile,*.jbuilder,*.rake,*.thor set filetype=ruby
autocmd Filetype,BufNewFile *_spec.rb nmap <Leader>r :!bundle exec rspec %<CR>
autocmd Filetype,BufNewFile *_spec.rb nmap <Leader>R :exe "!bundle exec rspec %\:" . line(".")<cr>
"---------------------------------------------------------------[Python]----
autocmd FileType python let python_highlight_space_errors=1
autocmd FileType python let python_highlight_all=1
autocmd FileType python set omnifunc=pythoncomplete#Complete
"-------------------------------------------------------------[Markdown]----
autocmd BufNewFile,BufRead *.md,*.mkd,*.markdown set filetype=markdown
autocmd FileType markdown set wrap linebreak
"---------------------------------------------------------[ Processing ]----
autocmd BufNewFile,BufRead *.pde set filetype=java
"-----------------------------------------------------------[ Protobuf ]----
autocmd BufNewFile,BufRead *.proto set filetype=proto
"---------------------------------------------------------------[ YAML ]----
autocmd BufNewFile,BufRead *.yml*,*.yaml*,.trebrc so ~/.vim/bundle/yaml.vim/colors/yaml.vim
"-------------------------------------------------------[ ActionScript ]----
autocmd BufNewFile,BufRead *.as set filetype=io
"---------------------------------------------------------------[ MXML ]----
autocmd BufNewFile,BufRead *.mxml set filetype=mxml
"-----------------------------------------------------------------[ Scala ]----
autocmd BufNewFile,BufRead *.scala set filetype=scala
au! Syntax scala source ~/.vim/bundle/scala.vim/syntax/scala.vim
"-----------------------------------------------------------------[ Io ]----
autocmd BufNewFile,BufRead *.io set filetype=io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.