<commit_before>#!/bin/bash

DEBUG=
while getopts "d" opt; do
    case $opt in
        d)
            DEBUG=1
            ;;
    esac
done
shift $(($OPTIND-1))

if [[ -z $1 ]]; then
    echo "Usage: $0 [options] FILENAME"
    echo "Run a test using vimcram"
    echo
    echo "Options:"
    echo "  -d  Enable debug mode"
    exit 1
fi

VIMOPTIONS="-N -u NONE" # Don't load user scripts or .vimrc

VIMCOMMANDS="RunTest \"$1\""
if [[ -n $DEBUG ]]; then
    VIMCOMMANDS="let g:vimcram_debug=1 | $VIMCOMMANDS"
fi

vim $VIMOPTIONS -S vimcram.vim -c "$VIMCOMMANDS"<commit_msg>Add an option to load the user's rc file and plugins (refs #8)<commit_after>#!/bin/bash

DEBUG=
LOADRC=
while getopts "d01" opt; do
    case $opt in
        d)
            DEBUG=1
            ;;
        0)
            LOADRC=
            ;;
        1)
            LOADRC=1
            ;;
    esac
done
shift $(($OPTIND-1))

if [[ -z $1 ]]; then
    echo "Usage: $0 [options] FILENAME"
    echo "Run a test using vimcram"
    echo
    echo "Options:"
    echo "  -d  Enable debug mode"
    exit 1
fi

VIMOPTIONS=""
if [[ -z $LOADRC ]]; then
    VIMOPTIONS="-N -u NONE" # Don't load user scripts or .vimrc
fi

VIMCOMMANDS="RunTest \"$1\""
if [[ -n $DEBUG ]]; then
    VIMCOMMANDS="let g:vimcram_debug=1 | $VIMCOMMANDS"
fi

vim $VIMOPTIONS -S vimcram.vim -c "$VIMCOMMANDS"
{'fraction_non_alphanumeric': 0.13816280806572068, 'fraction_numerical': 0.014936519790888723, 'mean_word_length': 2.1678486997635935, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3541628', 'n_tokens_mistral': 540, 'n_tokens_neox': 517, 'n_words': 156}