Skip to content

Commit 3b41f70

Browse files
committed
Merge pull request spf13#75 from stephpy/3.0
Use if executable, if there is no ctags, not install tagbar bundle, idem...
2 parents 788221d + 11080ca commit 3b41f70

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

.vimrc

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
" Windows Compatible {
2525
" On Windows, also use '.vim' instead of 'vimfiles'; this makes synchronization
26-
" across (heterogeneous) systems easier.
26+
" across (heterogeneous) systems easier.
2727
if has('win32') || has('win64')
2828
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
2929
endif
@@ -42,7 +42,9 @@
4242
Bundle 'gmarik/vundle'
4343
Bundle 'MarcWeber/vim-addon-mw-utils'
4444
Bundle 'tomtom/tlib_vim'
45-
Bundle 'mileszs/ack.vim'
45+
if executable('ack')
46+
Bundle 'mileszs/ack.vim'
47+
endif
4648

4749
" Use local bundles if available {
4850
if filereadable(expand("~/.vimrc.bundles.local"))
@@ -56,8 +58,8 @@
5658
let g:spf13_bundle_groups=['general', 'programming', 'php', 'ruby', 'python', 'javascript', 'html', 'misc']
5759
endif
5860

59-
" To override all the included bundles, put
60-
" g:override_spf13_bundles = 1
61+
" To override all the included bundles, put
62+
" g:override_spf13_bundles = 1
6163
" in your .vimrc.bundles.local file"
6264
if !exists("g:override_spf13_bundles")
6365

@@ -93,7 +95,9 @@
9395
Bundle 'tpope/vim-fugitive'
9496
Bundle 'scrooloose/nerdcommenter'
9597
Bundle 'godlygeek/tabular'
96-
Bundle 'majutsushi/tagbar'
98+
if executable('ctags')
99+
Bundle 'majutsushi/tagbar'
100+
endif
97101
Bundle 'Shougo/neocomplcache'
98102
endif
99103

@@ -173,7 +177,7 @@
173177
" }
174178

175179
" Vim UI {
176-
if filereadable(expand("~/.vim/bundle/vim-colors-solarized/colors/solarized.vim"))
180+
if filereadable(expand("~/.vim/bundle/vim-colors-solarized/colors/solarized.vim"))
177181
color solarized " load a colorscheme
178182
endif
179183
let g:solarized_termtrans=1
@@ -232,7 +236,7 @@
232236
set expandtab " tabs are spaces, not tabs
233237
set tabstop=4 " an indentation every four columns
234238
set softtabstop=4 " let backspace delete indent
235-
"set matchpairs+=<:> " match, to be used with %
239+
"set matchpairs+=<:> " match, to be used with %
236240
set pastetoggle=<F12> " pastetoggle (sane indentation on pastes)
237241
"set comments=sl:/*,mb:*,elx:*/ " auto format comment blocks
238242
" Remove trailing whitespaces and ^M chars
@@ -296,7 +300,7 @@
296300
297301
" visual shifting (does not exit Visual mode)
298302
vnoremap < <gv
299-
vnoremap > >gv
303+
vnoremap > >gv
300304
301305
" Fix home and end keybindings for screen, particularly on mac
302306
" - for some reason this fixes the arrow keys too. huh.
@@ -491,10 +495,10 @@
491495
inoremap <expr><C-l> neocomplcache#complete_common_string()
492496
493497

494-
" <CR>: close popup
498+
" <CR>: close popup
495499
" <s-CR>: close popup and save indent.
496500
inoremap <expr><CR> pumvisible() ? neocomplcache#close_popup() : "\<CR>"
497-
inoremap <expr><s-CR> pumvisible() ? neocomplcache#close_popup() "\<CR>" : "\<CR>"
501+
inoremap <expr><s-CR> pumvisible() ? neocomplcache#close_popup() "\<CR>" : "\<CR>"
498502
" <TAB>: completion.
499503
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
500504
@@ -598,8 +602,8 @@ endfunction
598602
" }
599603

600604
" Use local gvimrc if available and gui is running {
601-
if has('gui_running')
602-
if filereadable(expand("~/.gvimrc.local"))
605+
if has('gui_running')
606+
if filereadable(expand("~/.gvimrc.local"))
603607
source ~/.gvimrc.local
604608
endif
605609
endif

0 commit comments

Comments
 (0)