Skip to content

Instantly share code, notes, and snippets.

@sai29
Created May 2, 2016 06:53
Show Gist options
  • Select an option

  • Save sai29/94e0c8b6ee8216eee87cdb6212387676 to your computer and use it in GitHub Desktop.

Select an option

Save sai29/94e0c8b6ee8216eee87cdb6212387676 to your computer and use it in GitHub Desktop.
My vimrc
"" Misc sensible settings
let mapleader = "'"
set nocompatible " choose no compatibility with legacy vi
syntax enable
set encoding=utf-8
set showcmd " display incomplete commands
filetype plugin indent on " load file type plugins + indentation
set number " show number line
set noswapfile " don't save swap files
set autoindent
set wrap
set textwidth=80
au FocusLost * :wa "Save file if window crashes
set hidden
set modifiable
"" Whitespace
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces (or set this to 4)
set expandtab " use spaces, not tabs (optional)
set backspace=indent,eol,start " backspace through everything in insert mode
"" Searching
set hlsearch " highlight matches
set incsearch " incremental searching
set ignorecase " searches are case insensitive...
set smartcase " ... unless they contain at least one capital letter:
"" Don't fucking remove this.
noremap <Up> <nop>
noremap <Down> <nop>
noremap <Left> <nop>
noremap <Right> <nop>
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive.git'
Plugin 'dhruvasagar/vim-railscasts-theme'
Bundle 'antlypls/vim-colors-codeschool'
Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/nerdTree'
Plugin 'jlanzarotta/bufexplorer'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" All of your Plugins must be added before the following line
call vundle#end() " required
colorscheme railscasts
set guifont=Monaco:h12
" auto reload .vimrc on save
augroup reload_vimrc " {
autocmd!
autocmd BufWritePost $MYVIMRC source $MYVIMRC
augroup END " }
" NERDTree settings
"
"" check file change every 4 seconds ('CursorHold') and reload the buffer upon detecting change
set autoread
au CursorHold * checktime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment