Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set encoding=utf-8
- set nocompatible " be iMproved
- filetype off " required!
- set rtp+=~/.vim/bundle/vundle/
- call vundle#rc()
- " let Vundle manage Vundle
- Bundle 'gmarik/vundle'
- " Vundle help
- """"""""""""""
- " :BundleList - list configured bundles
- " :BundleInstall(!) - install(update) bundles
- " :BundleSearch(!) foo - search(or refresh cache first) for foo
- " :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
- " VCS
- Bundle 'tpope/vim-fugitive'
- " System
- Bundle 'scrooloose/nerdtree'
- Bundle 'vim-scripts/Gist.vim'
- Bundle 'majutsushi/tagbar'
- Bundle 'mileszs/ack.vim'
- Bundle 'scrooloose/nerdcommenter'
- Bundle 'tpope/vim-surround'
- Bundle 'scrooloose/syntastic'
- Bundle 'ervandew/supertab'
- Bundle 'Raimondi/delimitMate'
- Bundle 'kien/rainbow_parentheses.vim'
- Bundle 'sophacles/vim-bundle-sparkup'
- " Syntaxes and such.
- Bundle 'tpope/vim-cucumber'
- Bundle 'leshill/vim-json'
- Bundle 'tpope/vim-liquid'
- Bundle 'rodjek/vim-puppet'
- Bundle 'tpope/vim-haml'
- Bundle 'kchmck/vim-coffee-script'
- Bundle 'plasticboy/vim-markdown'
- Bundle 'groenewege/vim-less'
- Bundle 'jcf/vim-latex'
- " Python bundles
- "Bundle 'kevinw/pyflakes-vim'
- Bundle 'fs111/pydoc.vim'
- "Bundle 'vim-scripts/pep8'
- Bundle 'atourino/jinja.vim'
- Bundle 'vim-scripts/python_match.vim'
- " Ruby specific
- Bundle "vim-ruby/vim-ruby"
- Bundle 'tpope/vim-endwise'
- " Non-github repos
- Bundle 'git://git.wincent.com/command-t.git'
- " Fun, but not useful
- Bundle 'altercation/vim-colors-solarized'
- Bundle 'skammer/vim-css-color'
- Bundle 'mgutz/vim-colors'
- Bundle 'ehamberg/vim-cute-python'
- Bundle 'tpope/vim-speeddating'
- Bundle 'Lokaltog/vim-powerline'
- filetype plugin indent on " required!
- " Configurations
- """"""""""""""""
- if has('gui_running')
- set background=light
- else
- set background=dark
- endif
- " Wildmenu completion
- """""""""""""""""""""
- set wildmenu
- set wildmode=list:longest
- set wildignore+=.hg,.git,.svn " Version control
- set wildignore+=*.aux,*.out,*.toc " LaTeX intermediate files
- set wildignore+=*.jpg,*.bmp,*.gif,*.png,*.jpeg " binary images
- set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest " compiled object files
- set wildignore+=*.spl " compiled spelling word lists
- set wildignore+=*.sw? " Vim swap files
- set wildignore+=*.DS_Store " OSX bullshit
- set wildignore+=*.luac " Lua byte code
- set wildignore+=*.pyc " Python byte code
- set wildignore+=**.class " Cursed Java class files
- " Save when losing focus
- set autowriteall " Auto-save files when switching buffers or leaving vim.
- au FocusLost * silent! :wa
- au TabLeave * silent! :wa
- " Resize splits when the window is resized
- au VimResized * exe "normal! \<c-w>="
- " Colours
- colorscheme chance-of-storm
- " Basic
- syntax enable
- set number " always show line numbers
- set hidden " Allow un-saved buffers in background
- set clipboard=unnamed " Share system clipboard.
- set backspace=indent,eol,start " Make backspace behave normally.
- set directory=/tmp// " swap files
- set backupskip=/tmp/*,/private/tmp/*
- set ffs=unix,dos,mac "Default file types
- set nowrap " don't wrap lines
- set showmatch " set show matching parenthesis
- set ignorecase " ignore case when searching
- set smartcase " ignore case if search pattern is all lowercase,
- " case-sensitive otherwise
- set hlsearch " highlight search terms
- set incsearch " show search matches as you type
- set history=1000 " remember more commands and search history
- set undolevels=1000 " use many muchos levels of undo
- set title " change the terminal's title
- set visualbell " don't beep
- set noerrorbells " don't beep
- " Remove the toolbar if we're running under a GUI (e.g. MacVIM).
- if has("gui_running")
- set guioptions=-t
- endif
- " Special characters for hilighting non-priting spaces/tabs/etc.
- set list listchars=tab:โ\ ,trail:ยท
- " Tabs & spaces
- set tabstop=2 " a tab is four spaces
- set shiftwidth=2 " number of spaces to use for autoindenting
- set softtabstop=2
- set noexpandtab
- set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
- set smarttab " insert tabs on the start of a line according to
- " shiftwidth, not tabstop
- set autoindent " always set autoindenting on
- set copyindent " copy the previous indentation on autoindenting
- " General Code Folding
- """"""""""""""""""""""
- set foldmethod=indent
- set foldlevel=99
- " Highlight VCS conflict markers
- """"""""""""""""""""""""""""""""
- match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
- " I CAN HAZ NORMAL REGEXES?
- """""""""""""""""""""""""""
- nnoremap / /\v
- vnoremap / /\v
- " General auto-commands
- """""""""""""""""""""""
- autocmd FileType * setlocal colorcolumn=0
- autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
- " Get rid of trailing whitespace highlighting in mutt.
- autocmd FileType mail highlight clear ExtraWhitespace
- autocmd FileType mail setlocal listchars=
- " Crontab auto-commands
- """""""""""""""""""""""
- autocmd FileType crontab setlocal backupcopy=yes
- " Markdown auto-commands
- """"""""""""""""""""""""
- autocmd FileType markdown setlocal wrap linebreak nolist
- " Ruby Configurations
- """""""""""""""""""""
- autocmd filetype ruby set shiftwidth=2 tabstop=2
- " PHP Configurations
- """"""""""""""""""""
- autocmd FileType php setlocal colorcolumn=100
- " Python configurations
- """""""""""""""""""""""
- au BufNewFile,BufReadPost python setlocal shiftwidth=4 tabstop=4 softtabstop=4 expandtab
- autocmd FileType python setlocal colorcolumn=80
- autocmd FileType python let g:pep8_map='<F4>'
- " Coffeescript configurations
- """""""""""""""""""""""""""""
- au BufNewFile,BufReadPost *.coffee setlocal foldmethod=indent
- au BufNewFile,BufReadPost *.coffee setlocal shiftwidth=2 expandtab
- " Javascript configurations
- """""""""""""""""""""""""""
- au BufNewFile,BufReadPost *.js setlocal shiftwidth=2 expandtab
- " Get jinja filetype selection working correctly for *.jinja.html files.
- au BufNewFile,BufReadPost *.jinja.html setlocal filetype=htmljinja
- " Make sure we hilight extra whitespace in the most annoying way possible.
- highlight ExtraWhitespace ctermbg=red guibg=red
- match ExtraWhitespace /\s\+$/
- autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
- autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
- autocmd InsertLeave * match ExtraWhitespace /\s\+$/
- " Custom mappings
- """"""""""""""""""
- " Genral
- noremap <silent> <F3> :QFix<CR>
- " Change leader
- let mapleader = ","
- let g:mapleader = ","
- " Get rid of search hilighting with ,/
- nnoremap <silent> <leader>/ :nohlsearch<CR>
- " Fix those pesky situations where you edit & need sudo to save
- cmap w!! w !sudo tee % >/dev/null
- " Plugin configurations
- """"""""""""""""""""""""
- " Gist
- let g:gist_clip_command = 'pbcopy'
- let g:gist_detect_filetype = 2
- let g:gist_show_privates = 1
- " TaskList
- "map <leader>l <Plug>TaskList
- " TagBar
- nnoremap <silent> <F2> :TagbarToggle<CR>
- let g:tagbar_ctags_bin = '/usr/local/bin/ctags'
- let g:tagbar_autoshowtag = 1
- " Command-T
- nnoremap <Leader>t :CommandT<CR>
- " NERDTree
- nnoremap <Leader>g :NERDTreeToggle<CR>
- " SnipMate
- let g:snippets_dir = "~/.vim/bundle/snipmate-snippets"
- " Sparkup
- let g:sparkupExecuteMapping = '<c-y>'
- let g:sparkupNextMapping = '<c-k>'
- " Double rainbow - What does it mean!?
- au VimEnter * RainbowParenthesesToggle
- au Syntax * RainbowParenthesesLoadRound
- au Syntax * RainbowParenthesesLoadSquare
- au Syntax * RainbowParenthesesLoadBraces
- set laststatus=2
- let g:syntastic_enable_signs=1
- let g:syntastic_auto_jump=0
Add Comment
Please, Sign In to add comment