<commit_before>#!/bin/bash

function backup {
  BACKUP_DIR=~/.vim_old_bkp_`date +%s`
  mkdir -p $BACKUP_DIR
  [[ -d ~/.vim ]] && mv ~/.vim $BACKUP_DIR/vim
  [[ -e ~/.vimrc ]] && mv ~/.vimrc $BACKUP_DIR/vimrc
  [[ -e ~/.gvimrc ]] && mv ~/.gvimrc $BACKUP_DIR/gvimrc
}

function prepare {
  mkdir -p vim/_backup
  mkdir -p vim/_temp
  mkdir -p vim/bundle
  if test ! -e vim/bundle/vundle; then
    git clone https://github.com/gmarik/vundle.git vim/bundle/vundle
  fi
}

function install {
  ln -s "`pwd`/vim" ~/.vim
  ln -s "`pwd`/vimrc" ~/.vimrc
  ln -s "`pwd`/gvimrc" ~/.gvimrc
  vim +BundleInstall +qall
}

function post_install {
  if test -e snipmate.vim/snippets/javascript.snippets; then
    rm snipmate.vim/snippets/javascript.snippets
  fi
}

backup
prepare
install
post_install<commit_msg>add ok at the end of setup<commit_after>#!/bin/bash

function backup {
  BACKUP_DIR=~/.vim_old_bkp_`date +%s`
  mkdir -p $BACKUP_DIR
  [[ -d ~/.vim ]] && mv ~/.vim $BACKUP_DIR/vim
  [[ -e ~/.vimrc ]] && mv ~/.vimrc $BACKUP_DIR/vimrc
  [[ -e ~/.gvimrc ]] && mv ~/.gvimrc $BACKUP_DIR/gvimrc
}

function prepare {
  mkdir -p vim/_backup
  mkdir -p vim/_temp
  mkdir -p vim/bundle
  if test ! -e vim/bundle/vundle; then
    git clone https://github.com/gmarik/vundle.git vim/bundle/vundle
  fi
}

function install {
  ln -s "`pwd`/vim" ~/.vim
  ln -s "`pwd`/vimrc" ~/.vimrc
  ln -s "`pwd`/gvimrc" ~/.gvimrc
  vim +BundleInstall +qall
}

function post_install {
  if test -e snipmate.vim/snippets/javascript.snippets; then
    rm snipmate.vim/snippets/javascript.snippets
  fi
}

backup
prepare
install
post_install

echo ok
{'fraction_non_alphanumeric': 0.15965346534653466, 'fraction_numerical': 0.0, 'mean_word_length': 2.9827586206896552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4450079', 'n_tokens_mistral': 755, 'n_tokens_neox': 680, 'n_words': 157}