Skip to content

Instantly share code, notes, and snippets.

@vagmi
Last active August 29, 2015 14:13
Show Gist options
  • Save vagmi/26b5fad3214a4c428a74 to your computer and use it in GitHub Desktop.
Save vagmi/26b5fad3214a4c428a74 to your computer and use it in GitHub Desktop.
My .vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'lambdatoast/elm.vim'
Plugin 'scrooloose/syntastic'
Plugin 'elixir-lang/vim-elixir'
Plugin 'tpope/vim-sensible'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-ruby/vim-ruby'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-dispatch'
Plugin 'guns/vim-clojure-static'
Plugin 'tpope/vim-classpath'
Plugin 'tpope/vim-fireplace'
Plugin 'flazz/vim-colorschemes'
Plugin 'kien/ctrlp.vim'
Plugin 'bling/vim-airline'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/nerdcommenter'
Plugin 'digitaltoad/vim-jade'
Plugin 'dhruvasagar/vim-table-mode'
Plugin 'pangloss/vim-javascript'
Plugin 'kchmck/vim-coffee-script'
Plugin 'mikewest/vimroom'
Plugin 'mxw/vim-jsx'
Plugin 'godlygeek/tabular'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'rking/ag.vim'
Plugin 'groenewege/vim-less'
Plugin 'mattn/emmet-vim'
Plugin 'thoughtbot/vim-rspec'
Plugin 'slim-template/vim-slim.git'
Plugin 'rainerborene/vim-reek'
Plugin 'benmills/vimux'
Plugin 'Valloric/YouCompleteMe'
Plugin 'skalnik/vim-vroom'
Plugin 'nathanaelkane/vim-indent-guides'
call vundle#end() " required
filetype plugin indent on " required
set sw=2
set expandtab
set smarttab
set autoindent
set ic
if has('gui')
set clipboard=unnamed
colorscheme monokai
set guifont=Liberation\ Mono\ For\ Powerline:h14
let g:airline_powerline_fonts = 1
end
let g:airline_powerline_fonts = 1
if has('gui_running')
set guioptions-=T " Remove the toolbar
set lines=40 " 40 lines of text instead of 24
if has('gui_macvim')
set transparency=5 " Make the window slightly transparent
endif
else
if &term == 'xterm' || &term == 'screen'
set t_Co=256 " Enable 256 colors to stop the CSApprox warning and make xterm vim shine
endif
"set term=builtin_ansi " Make arrow and other keys work
endif
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:jsx_ext_required = 0
set directory=$HOME/.vim/swapfiles/
" RSpec.vim mappings
map <Leader>s :VroomRunNearestTest<CR>
map <Leader>l :VroomRunLastTest<CR>
map <Leader>f :vsp<CR>:A<CR>
"noremap <Up> <NOP>
"noremap <Down> <NOP>
"noremap <Left> <NOP>
"noremap <Right> <NOP>
let g:rspec_command = "Dispatch bin/rspec {spec}"
let g:vroom_use_vimux = 1
let g:syntastic_javascript_checkers = ['jsxhint']
let g:syntastic_javascript_jsxhint_exec = 'jsx-jshint-wrapper'
set clipboard=unnamed
nnoremap K i<CR><Esc>
" Nerdtree find to find current file in tree
"map <Leader>r :NERDTreeFind<CR>
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
"autocmd BufWritePre * :%s/\s\+$//e
noremap <Leader>c :%s/\s\+$//g<CR>
set vb t_vb=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment