Merge branch '3.0' of github.com:spf13/spf13-vim into 3.0

This commit is contained in:
spf13 2014-06-30 14:38:56 -04:00
commit a040dd554a

240
.vimrc
View File

@ -430,13 +430,19 @@
" } " }
" PIV { " PIV {
let g:DisableAutoPHPFolding = 0 if isdirectory(expand("~/.vim/bundle/PIV"))
let g:PIVAutoClose = 0 let g:DisableAutoPHPFolding = 0
let g:PIVAutoClose = 0
endif
" } " }
" Misc { " Misc {
let g:NERDShutUp=1 if isdirectory(expand("~/.vim/bundle/nerdtree"))
let b:match_ignorecase = 1 let g:NERDShutUp=1
endif
if isdirectory(expand("~/.vim/bundle/matchit.zip"))
let b:match_ignorecase = 1
endif
" } " }
" OmniComplete { " OmniComplete {
@ -491,42 +497,48 @@
" } " }
" NerdTree { " NerdTree {
map <C-e> <plug>NERDTreeTabsToggle<CR> if isdirectory(expand("~/.vim/bundle/nerdtree"))
map <leader>e :NERDTreeFind<CR> map <C-e> <plug>NERDTreeTabsToggle<CR>
nmap <leader>nt :NERDTreeFind<CR> map <leader>e :NERDTreeFind<CR>
nmap <leader>nt :NERDTreeFind<CR>
let NERDTreeShowBookmarks=1 let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr'] let NERDTreeIgnore=['\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr']
let NERDTreeChDirMode=0 let NERDTreeChDirMode=0
let NERDTreeQuitOnOpen=1 let NERDTreeQuitOnOpen=1
let NERDTreeMouseMode=2 let NERDTreeMouseMode=2
let NERDTreeShowHidden=1 let NERDTreeShowHidden=1
let NERDTreeKeepTreeInNewTab=1 let NERDTreeKeepTreeInNewTab=1
let g:nerdtree_tabs_open_on_gui_startup=0 let g:nerdtree_tabs_open_on_gui_startup=0
endif
" } " }
" Tabularize { " Tabularize {
nmap <Leader>a& :Tabularize /&<CR> if isdirectory(expand("~/.vim/bundle/tabular"))
vmap <Leader>a& :Tabularize /&<CR> nmap <Leader>a& :Tabularize /&<CR>
nmap <Leader>a= :Tabularize /=<CR> vmap <Leader>a& :Tabularize /&<CR>
vmap <Leader>a= :Tabularize /=<CR> nmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:<CR> vmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a: :Tabularize /:<CR> nmap <Leader>a: :Tabularize /:<CR>
nmap <Leader>a:: :Tabularize /:\zs<CR> vmap <Leader>a: :Tabularize /:<CR>
vmap <Leader>a:: :Tabularize /:\zs<CR> nmap <Leader>a:: :Tabularize /:\zs<CR>
nmap <Leader>a, :Tabularize /,<CR> vmap <Leader>a:: :Tabularize /:\zs<CR>
vmap <Leader>a, :Tabularize /,<CR> nmap <Leader>a, :Tabularize /,<CR>
nmap <Leader>a,, :Tabularize /,\zs<CR> vmap <Leader>a, :Tabularize /,<CR>
vmap <Leader>a,, :Tabularize /,\zs<CR> nmap <Leader>a,, :Tabularize /,\zs<CR>
nmap <Leader>a<Bar> :Tabularize /<Bar><CR> vmap <Leader>a,, :Tabularize /,\zs<CR>
vmap <Leader>a<Bar> :Tabularize /<Bar><CR> nmap <Leader>a<Bar> :Tabularize /<Bar><CR>
vmap <Leader>a<Bar> :Tabularize /<Bar><CR>
endif
" } " }
" Session List { " Session List {
set sessionoptions=blank,buffers,curdir,folds,tabpages,winsize set sessionoptions=blank,buffers,curdir,folds,tabpages,winsize
nmap <leader>sl :SessionList<CR> if isdirectory(expand("~/.vim/bundle/sessionman.vim/"))
nmap <leader>ss :SessionSave<CR> nmap <leader>sl :SessionList<CR>
nmap <leader>sc :SessionClose<CR> nmap <leader>ss :SessionSave<CR>
nmap <leader>sc :SessionClose<CR>
endif
" } " }
" JSON { " JSON {
@ -539,80 +551,90 @@
let g:pymode = 0 let g:pymode = 0
endif endif
let g:pymode_lint_checkers = ['pyflakes'] if isdirectory(expand("~/.vim/bundle/python-mode"))
let g:pymode_trim_whitespaces = 0 let g:pymode_lint_checkers = ['pyflakes']
let g:pymode_options = 0 let g:pymode_trim_whitespaces = 0
let g:pymode_rope = 0 let g:pymode_options = 0
let g:pymode_rope = 0
endif
" } " }
" ctrlp { " ctrlp {
let g:ctrlp_working_path_mode = 'ra' if isdirectory(expand("~/.vim/bundle/ctrlp.vim/"))
nnoremap <silent> <D-t> :CtrlP<CR> let g:ctrlp_working_path_mode = 'ra'
nnoremap <silent> <D-r> :CtrlPMRU<CR> nnoremap <silent> <D-t> :CtrlP<CR>
let g:ctrlp_custom_ignore = { nnoremap <silent> <D-r> :CtrlPMRU<CR>
\ 'dir': '\.git$\|\.hg$\|\.svn$', let g:ctrlp_custom_ignore = {
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.pyc$' } \ 'dir': '\.git$\|\.hg$\|\.svn$',
\ 'file': '\.exe$\|\.so$\|\.dll$\|\.pyc$' }
" On Windows use "dir" as fallback command. " On Windows use "dir" as fallback command.
if WINDOWS() if WINDOWS()
let s:ctrlp_fallback = 'dir %s /-n /b /s /a-d' let s:ctrlp_fallback = 'dir %s /-n /b /s /a-d'
elseif executable('ag') elseif executable('ag')
let s:ctrlp_fallback = 'ag %s --nocolor -l -g ""' let s:ctrlp_fallback = 'ag %s --nocolor -l -g ""'
elseif executable('ack-grep') elseif executable('ack-grep')
let s:ctrlp_fallback = 'ack-grep %s --nocolor -f' let s:ctrlp_fallback = 'ack-grep %s --nocolor -f'
elseif executable('ack') elseif executable('ack')
let s:ctrlp_fallback = 'ack %s --nocolor -f' let s:ctrlp_fallback = 'ack %s --nocolor -f'
else else
let s:ctrlp_fallback = 'find %s -type f' let s:ctrlp_fallback = 'find %s -type f'
endif
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'],
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
\ },
\ 'fallback': s:ctrlp_fallback
\ }
if isdirectory(expand("~/.vim/bundle/ctrlp-funky/"))
" CtrlP extensions
let g:ctrlp_extensions = ['funky']
"funky
nnoremap <Leader>fu :CtrlPFunky<Cr>
endif
endif endif
let g:ctrlp_user_command = {
\ 'types': {
\ 1: ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'],
\ 2: ['.hg', 'hg --cwd %s locate -I .'],
\ },
\ 'fallback': s:ctrlp_fallback
\ }
" CtrlP extensions
let g:ctrlp_extensions = ['funky']
"funky
nnoremap <Leader>fu :CtrlPFunky<Cr>
"} "}
" TagBar { " TagBar {
nnoremap <silent> <leader>tt :TagbarToggle<CR> if isdirectory(expand("~/.vim/bundle/tagbar/"))
nnoremap <silent> <leader>tt :TagbarToggle<CR>
" If using go please install the gotags program using the following " If using go please install the gotags program using the following
" go install github.com/jstemmer/gotags " go install github.com/jstemmer/gotags
" And make sure gotags is in your path " And make sure gotags is in your path
let g:tagbar_type_go = { let g:tagbar_type_go = {
\ 'ctagstype' : 'go', \ 'ctagstype' : 'go',
\ 'kinds' : [ 'p:package', 'i:imports:1', 'c:constants', 'v:variables', \ 'kinds' : [ 'p:package', 'i:imports:1', 'c:constants', 'v:variables',
\ 't:types', 'n:interfaces', 'w:fields', 'e:embedded', 'm:methods', \ 't:types', 'n:interfaces', 'w:fields', 'e:embedded', 'm:methods',
\ 'r:constructor', 'f:functions' ], \ 'r:constructor', 'f:functions' ],
\ 'sro' : '.', \ 'sro' : '.',
\ 'kind2scope' : { 't' : 'ctype', 'n' : 'ntype' }, \ 'kind2scope' : { 't' : 'ctype', 'n' : 'ntype' },
\ 'scope2kind' : { 'ctype' : 't', 'ntype' : 'n' }, \ 'scope2kind' : { 'ctype' : 't', 'ntype' : 'n' },
\ 'ctagsbin' : 'gotags', \ 'ctagsbin' : 'gotags',
\ 'ctagsargs' : '-sort -silent' \ 'ctagsargs' : '-sort -silent'
\ } \ }
endif
"} "}
" Fugitive { " Fugitive {
nnoremap <silent> <leader>gs :Gstatus<CR> if isdirectory(expand("~/.vim/bundle/vim-fugitive/"))
nnoremap <silent> <leader>gd :Gdiff<CR> nnoremap <silent> <leader>gs :Gstatus<CR>
nnoremap <silent> <leader>gc :Gcommit<CR> nnoremap <silent> <leader>gd :Gdiff<CR>
nnoremap <silent> <leader>gb :Gblame<CR> nnoremap <silent> <leader>gc :Gcommit<CR>
nnoremap <silent> <leader>gl :Glog<CR> nnoremap <silent> <leader>gb :Gblame<CR>
nnoremap <silent> <leader>gp :Git push<CR> nnoremap <silent> <leader>gl :Glog<CR>
nnoremap <silent> <leader>gr :Gread<CR> nnoremap <silent> <leader>gp :Git push<CR>
nnoremap <silent> <leader>gw :Gwrite<CR> nnoremap <silent> <leader>gr :Gread<CR>
nnoremap <silent> <leader>ge :Gedit<CR> nnoremap <silent> <leader>gw :Gwrite<CR>
" Mnemonic _i_nteractive nnoremap <silent> <leader>ge :Gedit<CR>
nnoremap <silent> <leader>gi :Git add -p %<CR> " Mnemonic _i_nteractive
nnoremap <silent> <leader>gg :SignifyToggle<CR> nnoremap <silent> <leader>gi :Git add -p %<CR>
nnoremap <silent> <leader>gg :SignifyToggle<CR>
endif
"} "}
" YouCompleteMe { " YouCompleteMe {
@ -923,15 +945,19 @@
endif endif
" UndoTree { " UndoTree {
nnoremap <Leader>u :UndotreeToggle<CR> if isdirectory(expand("~/.vim/bundle/undotree/"))
" If undotree is opened, it is likely one wants to interact with it. nnoremap <Leader>u :UndotreeToggle<CR>
let g:undotree_SetFocusWhenToggle=1 " If undotree is opened, it is likely one wants to interact with it.
let g:undotree_SetFocusWhenToggle=1
endif
" } " }
" indent_guides { " indent_guides {
let g:indent_guides_start_level = 2 if isdirectory(expand("~/.vim/bundle/vim-indent-guides/"))
let g:indent_guides_guide_size = 1 let g:indent_guides_start_level = 2
let g:indent_guides_enable_on_vim_startup = 1 let g:indent_guides_guide_size = 1
let g:indent_guides_enable_on_vim_startup = 1
endif
" } " }
" Wildfire { " Wildfire {
@ -952,13 +978,15 @@
" See `:echo g:airline_theme_map` for some more choices " See `:echo g:airline_theme_map` for some more choices
" Default in terminal vim is 'dark' " Default in terminal vim is 'dark'
if !exists('g:airline_theme') if isdirectory(expand("~/.vim/bundle/vim-airline/"))
let g:airline_theme = 'solarized' if !exists('g:airline_theme')
endif let g:airline_theme = 'solarized'
if !exists('g:airline_powerline_fonts') endif
" Use the default set of separators with a few customizations if !exists('g:airline_powerline_fonts')
let g:airline_left_sep='' " Slightly fancier than '>' " Use the default set of separators with a few customizations
let g:airline_right_sep='' " Slightly fancier than '<' let g:airline_left_sep='' " Slightly fancier than '>'
let g:airline_right_sep='' " Slightly fancier than '<'
endif
endif endif
" } " }