Skip to content

Instantly share code, notes, and snippets.

@copacetic
Created September 24, 2014 21:43
Show Gist options
  • Save copacetic/a6745af6f20e51412f98 to your computer and use it in GitHub Desktop.
Save copacetic/a6745af6f20e51412f98 to your computer and use it in GitHub Desktop.
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/vundle'
Plugin 'mbbill/undotree'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/syntastic'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-sensible'
" Shows lines edited via underlying VC
Plugin 'mhinz/vim-signify'
" Requires a patched font for the terminal emulator
Plugin 'Lokaltog/powerline', {'rtp':'/powerline/bindings/vim'}
Plugin 'nathanaelkane/vim-indent-guides'
" Autocomplete
Plugin 'Shougo/neocomplcache'
Plugin 'Shougo/neosnippet'
Plugin 'Shougo/neosnippet-snippets'
Plugin 'honza/vim-snippets'
" Rails
Plugin 'tpope/vim-rails'
let g:rubycomplete_buffer_loading = 1
" Gist
Plugin 'mattn/webapi-vim'
Plugin 'mattn/gist-vim'
" HTML
Plugin 'amirh/HTML-AutoCloseTag'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'gorodinskiy/vim-coloresque'
Plugin 'tpope/vim-haml'
" Javascript
Plugin 'elzr/vim-json'
Plugin 'groenewege/vim-less'
Plugin 'pangloss/vim-javascript'
Plugin 'briancollins/vim-jst'
Plugin 'mxw/vim-jsx'
Plugin 'kchmck/vim-coffee-script'
" Scala
Plugin 'derekwyatt/vim-scala'
Plugin 'derekwyatt/vim-sbt'
call vundle#end() " required
filetype plugin indent on " required
set nowrap " Do not wrap long lines
set autoindent " Indent at the same level of the previous line
set shiftwidth=2 " Use indents of 4 spaces
set expandtab " Tabs are spaces, not tabs
set tabstop=2 " An indentation every four columns
set softtabstop=2 " Let backspace delete indent
set splitright " Puts new vsplit windows to the right of the current
set splitbelow " Puts new split windows to the bottom of the current
set number
" Gist
let g:gist_clip_command = 'pbcopy'
let g:gist_open_browser_after_post = 1
let g:gist_show_privates = 1
let g:gist_post_private = 1
" Syntastic, use jsxhint
let g:syntastic_javascript_checkers = ['jsxhint']
" Added for powerline
set laststatus=2
set encoding=utf-8
set t_Co=256
" Highlight whitespace
highlight ExtraWhitespace ctermbg=darkgreen guibg=darkgreen
match ExtraWhitespace /\s\+$\|\t/
" OmniComplete {
let g:neocomplcache_enable_at_startup = 1
if has("autocmd") && exists("+omnifunc")
autocmd Filetype *
\if &omnifunc == "" |
\setlocal omnifunc=syntaxcomplete#Complete |
\endif
endif
hi Pmenu guifg=#000000 guibg=#F8F8F8 ctermfg=black ctermbg=Lightgray
hi PmenuSbar guifg=#8A95A7 guibg=#F8F8F8 gui=NONE ctermfg=darkcyan ctermbg=lightgray cterm=NONE
hi PmenuThumb guifg=#F8F8F8 guibg=#8A95A7 gui=NONE ctermfg=lightgray ctermbg=darkcyan cterm=NONE
" Some convenient mappings
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <Left> neocomplcache#close_popup() . "\<Left>"
inoremap <expr> <Right> neocomplcache#close_popup() . "\<Right>"
inoremap <expr> <Up> neocomplcache#close_popup() . "\<Up>"
inoremap <expr> <Down> neocomplcache#close_popup() . "\<Down>"
inoremap <expr> <Cr> neocomplcache#close_popup() . "\<Cr>"
inoremap <expr> <Bs> neocomplcache#cancel_popup() . "\<Bs>"
" Automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
set completeopt=menu,preview,longest
" }
" ctrlp
let g:ctrlp_map = "<C-p>"
let g:ctrlp_cmd = 'CtrlPLastMode'
let g:ctrlp_max_files=0
let g:ctrlp_user_command =
\ ['.git', 'cd %s && git ls-files . -co --exclude-standard']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment