Skip to content

Instantly share code, notes, and snippets.

@benbrandt
Last active March 2, 2016 01:26
Show Gist options
  • Save benbrandt/48f3469f59ba9fe7362b to your computer and use it in GitHub Desktop.
Save benbrandt/48f3469f59ba9fe7362b to your computer and use it in GitHub Desktop.
Current .vimrc
" A minimal vimrc for new vim users to start with.
"
" Referenced here: http://www.benorenstein.com/blog/your-first-vimrc-should-be-nearly-empty/
" Original Author: Bram Moolenaar <Bram@vim.org>
" Made more minimal by: Ben Orenstein
" Last change: 2012 Jan 20
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
"
" If you don't understand a setting in here, just type ':h setting'.
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
filetype off
" Set theruntime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'pangloss/vim-javascript'
Plugin 'scrooloose/syntastic'
Plugin 'airblade/vim-gitgutter'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'jiangmiao/auto-pairs'
Plugin 'vim-airline/vim-airline'
Plugin 'mxw/vim-jsx'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'terryma/vim-multiple-cursors'
" All of your plugins must be added before the following line
call vundle#end()
" Make backspace behave in a sane manner.
set backspace=indent,eol,start
" Switch syntax highlighting on
syntax on
" color scheme
colorscheme hybrid_material
let g:enable_bold_font = 1
" Font settings
set guifont=Fira\ Mono:h17
" set split direction
set splitright
" Enable file type detection and do language-dependent indenting.
filetype plugin indent on
" show line numbers
set number
" set tabs to have 4 spaces
set tabstop=4
set softtabstop=4
set shiftwidth=4
" indent when moving to the next line while writing code
set autoindent
" expand tabs into spaces
set expandtab
" shows the last command entered
set showcmd
" visual autocomplete for command menu
set wildmenu
" redraw only when we need to
set lazyredraw
" show the matching part of the pair for [] {} and ()
set showmatch
" search and highlight matches as characters are entered
set incsearch
set hlsearch
" turn off search highlight
nnoremap <leader><space> :nohlsearch<CR>
" jk is escape
inoremap jk <esc>
" syntasic config
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_javascript_checkers = ['eslint']
let g:jsx_ext_required = 1
" ctrp config
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_root_markers = ['pom.xml', '.p4ignore']
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe " Windows
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment