#!/bin/bash cd rm -f .vimrc rm -rf .vim/ mkdir .vim cd .vim mkdir bundle git init git submodule add https://github.com/tpope/vim-pathogen.git bundle/pathogen git submodule update --init ln -s bundle/pathogen/autoload/ autoload git submodule add https://github.com/flazz/vim-colorschemes.git bundle/colorschemes git submodule update --init ln -s bundle/colorschemes/colors/ colors git submodule add https://github.com/kien/ctrlp.vim.git bundle/ctrlp git submodule update --init git submodule add https://github.com/tpope/vim-fugitive.git bundle/fugitive git submodule update --init git submodule add https://github.com/wookiehangover/jshint.vim.git bundle/jshint git submodule update --init git submodule add https://github.com/scrooloose/nerdcommenter.git bundle/nerdcommenter git submodule update --init git submodule add https://github.com/scrooloose/nerdtree.git bundle/nerdtree git submodule update --init git submodule add https://github.com/Lokaltog/vim-powerline bundle/powerline git submodule update --init git submodule add https://github.com/msanders/snipmate.vim.git bundle/snipmate git submodule update --init git submodule add https://github.com/ervandew/supertab.git bundle/supertab git submodule update --init git submodule add https://github.com/tpope/vim-surround.git bundle/surround git submodule update --init git submodule add https://github.com/scrooloose/syntastic.git bundle/syntastic git submodule update --init git submodule add https://github.com/vim-scripts/SyntaxComplete.git bundle/syntaxcomplete git submodule update --init git submodule add https://github.com/majutsushi/tagbar.git bundle/tagbar git submodule update --init git submodule add https://github.com/ludovicPelle/vim-xdebug.git bundle/xdebug git submodule update --init git submodule add http://git.drupal.org/project/vimrc.git bundle/drupalvim git submodule update --init cat ~/.vim/bundle/drupalvim/examples/vimrc_timplunkett.vim > ~/.vimrc echo "\" Additional general vim settings" >> ~/.vimrc echo "set expandtab" >> ~/.vimrc echo "set tabstop=2" >> ~/.vimrc echo "set shiftwidth=2" >> ~/.vimrc echo "set autoindent" >> ~/.vimrc echo "set smartindent" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Load plugins" >> ~/.vimrc echo "call pathogen#infect('~/.vim/bundle/drupalvim/bundle/vim-plugin-for-drupal/{}')" >> ~/.vimrc echo "call pathogen#infect()" >> ~/.vimrc echo "call pathogen#helptags()" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Set the color scheme" >> ~/.vimrc echo "if ! has(\"gui_running\")" >> ~/.vimrc echo " set t_Co=256" >> ~/.vimrc echo "endif" >> ~/.vimrc echo "\" feel free to choose :set background=dark for a different style" >> ~/.vimrc echo "set background=light" >> ~/.vimrc echo "colors peaksea" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Check syntax" >> ~/.vimrc echo "nnoremap :SyntasticCheck" >> ~/.vimrc echo "let g:syntastic_aggregate_errors = 1" >> ~/.vimrc echo "let g:syntastic_always_populate_loc_list = 1" >> ~/.vimrc echo "let g:syntastic_auto_jump = 2" >> ~/.vimrc echo "let g:syntastic_auto_loc_list = 1" >> ~/.vimrc echo "let g:syntastic_debug = 0" >> ~/.vimrc echo "let g:syntastic_enable_highlighting = 1" >> ~/.vimrc echo "let g:syntastic_enable_signs = 1" >> ~/.vimrc echo "let g:syntastic_error_symbol = '✗'" >> ~/.vimrc echo "let g:syntastic_php_checkers = ['php', 'phpcs', 'phpmd']" >> ~/.vimrc echo "let g:syntastic_php_phpcs_args = '--standard=Drupal --report=csv --extensions=inc,install,module,php,profile,test,theme'" >> ~/.vimrc echo "let g:syntastic_phpcs_disable = 1" >> ~/.vimrc echo "let g:syntastic_quiet_messages = { \"level\": \"warnings\", \"type\": \"syntax\" }" >> ~/.vimrc echo "let g:syntastic_stl_format = '[%E{Errors: %e starting on line %fe}%B{, }%W{Warnings: %w starting on line %fw}]'" >> ~/.vimrc echo "let g:syntastic_style_error_symbol = 'S✗'" >> ~/.vimrc echo "let g:syntastic_style_warning_symbol = 'S⚠'" >> ~/.vimrc echo "let g:syntastic_warning_symbol = '⚠'" >> ~/.vimrc echo "highlight SyntasticErrorLine guibg=red" >> ~/.vimrc echo "highlight SyntasticWarningLine guibg=yellow" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Highlight trailing whitespace" >> ~/.vimrc echo "highlight ExtraWhitespace ctermbg=red guibg=red" >> ~/.vimrc echo "match ExtraWhitespace /\s\+$/" >> ~/.vimrc echo "autocmd BufWinEnter * match ExtraWhitespace /\s\+$/" >> ~/.vimrc echo "autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@> ~/.vimrc echo "autocmd InsertLeave * match ExtraWhitespace /\s\+$/" >> ~/.vimrc echo "autocmd BufWinLeave * call clearmatches()" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Remove trailing whitespace" >> ~/.vimrc echo "function! TrimWhiteSpace()" >> ~/.vimrc echo " %s/\s\+$//e" >> ~/.vimrc echo "endfunction" >> ~/.vimrc echo "autocmd BufWritePre *.inc,*.install,*.module,*.php,*.profile,*.test,*.theme :call TrimWhiteSpace()" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Toggle the NERDTree window" >> ~/.vimrc echo "nnoremap :NERDTreeToggle" >> ~/.vimrc echo "let NERDTreeShowHidden=1" >> ~/.vimrc echo "let NERDTreeDirArrows=1" >> ~/.vimrc echo "let NERDTreeAutoDeleteBuffer=1" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Toggle the Tagbar window" >> ~/.vimrc echo "nnoremap :TagbarToggle" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Toggle line numbers" >> ~/.vimrc echo "nnoremap :set invnumber" >> ~/.vimrc echo "" >> ~/.vimrc echo "\" Toggle current fold open/closed" >> ~/.vimrc echo "nnoremap za" >> ~/.vimrc