2012-09-19 13:34:47 +00:00
|
|
|
" Modeline and Notes {
|
2013-03-29 03:12:26 +00:00
|
|
|
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker spell:
|
2012-09-19 13:34:47 +00:00
|
|
|
"
|
|
|
|
" __ _ _____ _
|
|
|
|
" ___ _ __ / _/ |___ / __ __(_)_ __ ___
|
|
|
|
" / __| '_ \| |_| | |_ \ _____\ \ / /| | '_ ` _ \
|
|
|
|
" \__ \ |_) | _| |___) |_____|\ V / | | | | | | |
|
|
|
|
" |___/ .__/|_| |_|____/ \_/ |_|_| |_| |_|
|
|
|
|
" |_|
|
|
|
|
"
|
|
|
|
" This is the personal .vimrc.bundles file of Steve Francia.
|
|
|
|
" While much of it is beneficial for general use, I would
|
|
|
|
" recommend picking out the parts you want and understand.
|
|
|
|
"
|
|
|
|
" You can find me at http://spf13.com
|
|
|
|
" }
|
|
|
|
|
|
|
|
" Environment {
|
2013-03-29 03:12:26 +00:00
|
|
|
|
2012-09-19 13:34:47 +00:00
|
|
|
" Basics {
|
2013-03-29 03:12:26 +00:00
|
|
|
set nocompatible " Must be first line
|
2012-09-19 13:34:47 +00:00
|
|
|
set background=dark " Assume a dark background
|
|
|
|
" }
|
|
|
|
|
|
|
|
" Windows Compatible {
|
|
|
|
" On Windows, also use '.vim' instead of 'vimfiles'; this makes synchronization
|
|
|
|
" across (heterogeneous) systems easier.
|
|
|
|
if has('win32') || has('win64')
|
|
|
|
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
|
2013-07-03 05:09:47 +00:00
|
|
|
|
|
|
|
" Be nice and check for multi_byte even if the config requires
|
|
|
|
" multi_byte support most of the time
|
|
|
|
if has("multi_byte")
|
|
|
|
" Windows cmd.exe still uses cp850. If Windows ever moved to
|
|
|
|
" Powershell as the primary terminal, this would be utf-8
|
|
|
|
set termencoding=cp850
|
|
|
|
" Let Vim use utf-8 internally, because many scripts require this
|
|
|
|
set encoding=utf-8
|
|
|
|
setglobal fileencoding=utf-8
|
|
|
|
" Windows has traditionally used cp1252, so it's probably wise to
|
|
|
|
" fallback into cp1252 instead of eg. iso-8859-15.
|
|
|
|
" Newer Windows files might contain utf-8 or utf-16 LE so we might
|
|
|
|
" want to try them first.
|
|
|
|
set fileencodings=ucs-bom,utf-8,utf-16le,cp1252,iso-8859-15
|
|
|
|
endif
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
" }
|
2013-07-26 08:00:03 +00:00
|
|
|
|
2012-09-19 13:34:47 +00:00
|
|
|
" Setup Bundle Support {
|
2013-03-29 03:12:26 +00:00
|
|
|
" The next three lines ensure that the ~/.vim/bundle/ system works
|
2012-09-19 13:34:47 +00:00
|
|
|
filetype off
|
2013-07-26 08:00:03 +00:00
|
|
|
if has('vim_starting')
|
|
|
|
set runtimepath+=~/.vim/bundle/neobundle.vim/
|
|
|
|
endif
|
|
|
|
|
|
|
|
call neobundle#rc(expand('~/.vim/bundle/'))
|
2013-09-09 04:35:52 +00:00
|
|
|
|
|
|
|
command! -nargs=? -bang -bar
|
|
|
|
\ -complete=customlist,neobundle#complete_bundles
|
|
|
|
\ BundleInstall
|
|
|
|
\ call neobundle#installer#install('!' == '<bang>', <q-args>)
|
|
|
|
|
|
|
|
command! -nargs=+ Bundle
|
|
|
|
\ call neobundle#parser#bundle(
|
|
|
|
\ substitute(<q-args>, '\s"[^"]\+$', '', ''))
|
|
|
|
|
|
|
|
command! -nargs=? -bang -bar
|
|
|
|
\ -complete=customlist,neobundle#complete_deleted_bundles
|
|
|
|
\ BundleClean
|
|
|
|
\ call neobundle#installer#clean('!' == '<bang>', <q-args>)
|
2012-09-19 13:34:47 +00:00
|
|
|
" }
|
|
|
|
|
|
|
|
" }
|
|
|
|
|
|
|
|
" Bundles {
|
2013-03-29 03:12:26 +00:00
|
|
|
|
2012-09-19 13:34:47 +00:00
|
|
|
" Deps
|
2013-07-26 08:00:03 +00:00
|
|
|
NeoBundleFetch 'Shougo/neobundle.vim'
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'MarcWeber/vim-addon-mw-utils'
|
|
|
|
Bundle 'tomtom/tlib_vim'
|
2012-09-19 13:34:47 +00:00
|
|
|
if executable('ack-grep')
|
|
|
|
let g:ackprg="ack-grep -H --nocolor --nogroup --column"
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'mileszs/ack.vim'
|
2012-09-19 13:34:47 +00:00
|
|
|
elseif executable('ack')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'mileszs/ack.vim'
|
2013-02-22 16:44:37 +00:00
|
|
|
elseif executable('ag')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'mileszs/ack.vim'
|
2013-07-02 01:32:23 +00:00
|
|
|
let g:ackprg = 'ag --nogroup --nocolor --column --smart-case'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" Use local bundles if available {
|
|
|
|
if filereadable(expand("~/.vimrc.bundles.local"))
|
|
|
|
source ~/.vimrc.bundles.local
|
|
|
|
endif
|
|
|
|
" }
|
2013-03-29 03:12:26 +00:00
|
|
|
|
2012-09-27 06:12:35 +00:00
|
|
|
" Use fork bundles if available {
|
|
|
|
if filereadable(expand("~/.vimrc.bundles.fork"))
|
|
|
|
source ~/.vimrc.bundles.fork
|
|
|
|
endif
|
|
|
|
" }
|
2012-09-19 13:34:47 +00:00
|
|
|
|
|
|
|
" In your .vimrc.bundles.local file"
|
|
|
|
" list only the plugin groups you will use
|
|
|
|
if !exists('g:spf13_bundle_groups')
|
2013-06-08 21:37:17 +00:00
|
|
|
let g:spf13_bundle_groups=['general', 'neocomplcache', 'programming', 'php', 'ruby', 'python', 'go', 'twig', 'javascript', 'haskell', 'html', 'misc', 'scala']
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" To override all the included bundles, put
|
|
|
|
" g:override_spf13_bundles = 1
|
|
|
|
" in your .vimrc.bundles.local file"
|
|
|
|
if !exists("g:override_spf13_bundles")
|
|
|
|
|
|
|
|
" General
|
|
|
|
if count(g:spf13_bundle_groups, 'general')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'scrooloose/nerdtree'
|
|
|
|
Bundle 'altercation/vim-colors-solarized'
|
|
|
|
Bundle 'spf13/vim-colors'
|
|
|
|
Bundle 'tpope/vim-surround'
|
|
|
|
Bundle 'spf13/vim-autoclose'
|
|
|
|
Bundle 'kien/ctrlp.vim'
|
2013-08-07 14:32:40 +00:00
|
|
|
Bundle 'terryma/vim-multiple-cursors'
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'vim-scripts/sessionman.vim'
|
|
|
|
Bundle 'matchit.zip'
|
2013-07-09 03:53:43 +00:00
|
|
|
if (has("python") || has("python3")) && exists('g:spf13_use_powerline') && !exists('g:spf13_use_old_powerline')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'Lokaltog/powerline', {'rtp':'/powerline/bindings/vim'}
|
2013-07-09 03:53:43 +00:00
|
|
|
elseif exists('g:spf13_use_powerline') && exists('g:spf13_use_old_powerline')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'Lokaltog/vim-powerline'
|
2013-07-09 03:53:43 +00:00
|
|
|
else
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'bling/vim-airline'
|
2013-04-10 12:50:13 +00:00
|
|
|
endif
|
|
|
|
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'Lokaltog/vim-easymotion'
|
|
|
|
Bundle 'godlygeek/csapprox'
|
|
|
|
Bundle 'jistr/vim-nerdtree-tabs'
|
|
|
|
Bundle 'flazz/vim-colorschemes'
|
|
|
|
Bundle 'mbbill/undotree'
|
|
|
|
Bundle 'myusuf3/numbers.vim'
|
|
|
|
Bundle 'nathanaelkane/vim-indent-guides'
|
2012-12-03 21:40:09 +00:00
|
|
|
if !exists('g:spf13_no_views')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'vim-scripts/restore_view.vim'
|
2012-12-03 21:40:09 +00:00
|
|
|
endif
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'airblade/vim-gitgutter'
|
|
|
|
Bundle 'tpope/vim-abolish.git'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" General Programming
|
|
|
|
if count(g:spf13_bundle_groups, 'programming')
|
|
|
|
" Pick one of the checksyntax, jslint, or syntastic
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'scrooloose/syntastic'
|
|
|
|
Bundle 'tpope/vim-fugitive'
|
|
|
|
Bundle 'mattn/webapi-vim'
|
|
|
|
Bundle 'mattn/gist-vim'
|
|
|
|
Bundle 'scrooloose/nerdcommenter'
|
|
|
|
Bundle 'godlygeek/tabular'
|
2012-09-19 13:34:47 +00:00
|
|
|
if executable('ctags')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'majutsushi/tagbar'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
2012-09-25 03:06:07 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" Snippets & AutoComplete
|
|
|
|
if count(g:spf13_bundle_groups, 'snipmate')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'garbas/vim-snipmate'
|
|
|
|
Bundle 'honza/vim-snippets'
|
2013-04-05 18:41:16 +00:00
|
|
|
" Source support_function.vim to support vim-snippets.
|
|
|
|
if filereadable(expand("~/.vim/bundle/vim-snippets/snippets/support_functions.vim"))
|
|
|
|
source ~/.vim/bundle/vim-snippets/snippets/support_functions.vim
|
2012-09-25 03:06:07 +00:00
|
|
|
endif
|
|
|
|
elseif count(g:spf13_bundle_groups, 'neocomplcache')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'Shougo/neocomplcache'
|
|
|
|
Bundle 'Shougo/neosnippet'
|
|
|
|
Bundle 'honza/vim-snippets'
|
2013-07-29 15:02:39 +00:00
|
|
|
elseif count(g:spf13_bundle_groups, 'neocomplete')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'Shougo/neocomplete.vim.git'
|
|
|
|
Bundle 'Shougo/neosnippet'
|
|
|
|
Bundle 'honza/vim-snippets'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" PHP
|
|
|
|
if count(g:spf13_bundle_groups, 'php')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'spf13/PIV'
|
|
|
|
Bundle 'arnaud-lb/vim-php-namespace'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" Python
|
|
|
|
if count(g:spf13_bundle_groups, 'python')
|
|
|
|
" Pick either python-mode or pyflakes & pydoc
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'klen/python-mode'
|
|
|
|
Bundle 'python.vim'
|
|
|
|
Bundle 'python_match.vim'
|
|
|
|
Bundle 'pythoncomplete'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" Javascript
|
|
|
|
if count(g:spf13_bundle_groups, 'javascript')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'elzr/vim-json'
|
|
|
|
Bundle 'groenewege/vim-less'
|
|
|
|
Bundle 'pangloss/vim-javascript'
|
|
|
|
Bundle 'briancollins/vim-jst'
|
|
|
|
Bundle 'kchmck/vim-coffee-script'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
2012-09-25 20:46:32 +00:00
|
|
|
" Java
|
|
|
|
if count(g:spf13_bundle_groups, 'scala')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'derekwyatt/vim-scala'
|
|
|
|
Bundle 'derekwyatt/vim-sbt'
|
2012-09-25 20:46:32 +00:00
|
|
|
endif
|
|
|
|
|
2013-06-08 21:37:17 +00:00
|
|
|
" Haskell
|
|
|
|
if count(g:spf13_bundle_groups, 'haskell')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'travitch/hasksyn'
|
|
|
|
Bundle 'dag/vim2hs'
|
|
|
|
Bundle 'Twinside/vim-haskellConceal'
|
|
|
|
Bundle 'lukerandall/haskellmode-vim'
|
|
|
|
Bundle 'ujihisa/neco-ghc'
|
|
|
|
Bundle 'eagletmt/ghcmod-vim'
|
|
|
|
Bundle 'Shougo/vimproc'
|
|
|
|
Bundle 'adinapoli/cumino'
|
|
|
|
Bundle 'bitc/vim-hdevtools'
|
2013-06-08 21:37:17 +00:00
|
|
|
endif
|
|
|
|
|
2012-09-19 13:34:47 +00:00
|
|
|
" HTML
|
|
|
|
if count(g:spf13_bundle_groups, 'html')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'amirh/HTML-AutoCloseTag'
|
|
|
|
Bundle 'hail2u/vim-css3-syntax'
|
|
|
|
Bundle 'tpope/vim-haml'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" Ruby
|
|
|
|
if count(g:spf13_bundle_groups, 'ruby')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'tpope/vim-rails'
|
2012-09-19 13:34:47 +00:00
|
|
|
let g:rubycomplete_buffer_loading = 1
|
|
|
|
"let g:rubycomplete_classes_in_global = 1
|
|
|
|
"let g:rubycomplete_rails = 1
|
|
|
|
endif
|
|
|
|
|
2013-04-05 04:09:35 +00:00
|
|
|
" Go Lang
|
2013-03-19 20:49:56 +00:00
|
|
|
if count(g:spf13_bundle_groups, 'go')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'jnwhiteh/vim-golang'
|
|
|
|
Bundle 'spf13/vim-gocode'
|
2013-03-19 20:49:56 +00:00
|
|
|
endif
|
|
|
|
|
2012-09-19 13:34:47 +00:00
|
|
|
" Misc
|
|
|
|
if count(g:spf13_bundle_groups, 'misc')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'tpope/vim-markdown'
|
|
|
|
Bundle 'spf13/vim-preview'
|
|
|
|
Bundle 'tpope/vim-cucumber'
|
|
|
|
Bundle 'quentindecock/vim-cucumber-align-pipes'
|
|
|
|
Bundle 'Puppet-Syntax-Highlighting'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
" Twig
|
|
|
|
if count(g:spf13_bundle_groups, 'twig')
|
2013-08-13 13:09:09 +00:00
|
|
|
Bundle 'beyondwords/vim-twig'
|
2012-09-19 13:34:47 +00:00
|
|
|
endif
|
|
|
|
endif
|
2013-03-29 03:12:26 +00:00
|
|
|
|
2012-09-19 13:34:47 +00:00
|
|
|
" }
|
|
|
|
|
|
|
|
" General {
|
|
|
|
" set autowrite " automatically write a file when leaving a modified buffer
|
2013-03-29 03:12:26 +00:00
|
|
|
set shortmess+=filmnrxoOtT " Abbrev. of messages (avoids 'hit enter')
|
2012-09-19 13:34:47 +00:00
|
|
|
" }
|
|
|
|
|