diff --git a/vim-sync-append.sh b/vim-sync-append.sh index b7d18d6..8cd03be 100755 --- a/vim-sync-append.sh +++ b/vim-sync-append.sh @@ -1,8 +1,18 @@ +############################ +# Vim Settings Setup script by ViViDboarder (Ian) +# http://github.com/ViViDboarder/Vim-Settings +############################ #! /bin/bash # Get current directory for future use in links VIM_SYNC_DIR=${PWD} +# Verify git is installed (although needed to checkout +command -v git >/dev/null 2>&1 || { + echo "Error: git required for install"; + exit 1; +} + # Clone vundle mkdir -p ~/.vim/bundle git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle @@ -28,7 +38,7 @@ if [[ ( ! -f ~/.vimrc ) ]]; then fi # if not already sourcing the synced version, source it -if ! ( grep -q 'source .vimrc_sync' ~/.vimrc ); then +if ! ( grep -q 'source ~/.vimrc_sync' ~/.vimrc ); then echo '' >> ~/.vimrc echo '"import vimrc from synced' >> ~/.vimrc echo 'source ~/.vimrc_sync' >> ~/.vimrc @@ -43,8 +53,28 @@ fi # Install all bundles vim +BundleInstall! +qall +# Compile CommandT if possible +# See if ruby is installed +if command -v ruby >/dev/null 2>&1; then + # Make sure GCC is installed + if command -v gcc >/dev/null 2>&1; then + # Use system ruby + command -v rvm >/dev/null 2>&1 && { rvm use system; } + cd ~/.vim/bundle/Command-T/ruby/command-t + ruby extconf.rb + make + fi +fi + +vim --version | grep -q '\+ruby' || { echo "Warning: Default vim does not include ruby as needed for Command T"; } +command -v ruby >/dev/null 2>&1 || { echo "Warning: ruby required for Command T"; } +command -v gcc >/dev/null 2>&1 || { echo "Warning: gcc required for Command T"; } + # Execute vim's update of the helptags vim +"helptags ~/.vim/doc" +"q" -echo "Should install ctags with sudo apt-get install ctags" +# Warn if ctags does not exist +command -v ctags >/dev/null 2>&1 || { echo "Warning: ctags required for Tag List +--- Debian: apt-get install ctags +--- OSX (MacPorts): port install ctags"; } diff --git a/vim/dot_vim/.netrwhist b/vim/dot_vim/.netrwhist deleted file mode 100644 index 76d645b..0000000 --- a/vim/dot_vim/.netrwhist +++ /dev/null @@ -1,7 +0,0 @@ -let g:netrw_dirhistmax =10 -let g:netrw_dirhist_cnt =5 -let g:netrw_dirhist_1='/home/ianfijolek/Dropbox/linux_home/vim/vim/doc' -let g:netrw_dirhist_2='/home/ianfijolek' -let g:netrw_dirhist_3='/home' -let g:netrw_dirhist_4='/' -let g:netrw_dirhist_5='/home/ianfijolek' diff --git a/vim/dot_vimrc b/vim/dot_vimrc index cdf8119..b3b2bcb 100644 --- a/vim/dot_vimrc +++ b/vim/dot_vimrc @@ -15,9 +15,9 @@ Bundle 'kien/ctrlp.vim' Bundle 'scrooloose/nerdtree' Bundle 'a.vim' Bundle 'file-line' +Bundle 'tpope/vim-fugitive' " Needs Vim compiled with Ruby Bundle 'wincent/Command-T' -Bundle 'tpope/vim-fugitive' " Buffer Nav Bundle 'kien/tabman.vim' @@ -38,6 +38,9 @@ Bundle 'gregsexton/MatchTag' "Allow arrow keys set nocompatible +"Use more convenient leader +let mapleader="," + "Enable mouse input set mousehide set mouse=a @@ -62,7 +65,6 @@ set backup set backupdir=~/.vim/backup set directory=~/.vim/tmp - "set theme try colorscheme vividchalk @@ -90,22 +92,15 @@ nmap lw :set wrap! "Allows filetype detection filetype on -"editing multiple files -"Ctrl+j maximizes split below -"Ctrl+k maximizes split above -"allows size 0 splits -"map j_ -"map k_ -"set wmh=0 - "Move between splits using Ctrl+hjkl map k map j map l map h -" map Shift+U to redo -map +"map Shift+U to redo +"Overwrites Make Uppercase +map " Buffet shortcut nnoremap :Bufferlist