Sublime Text 2 R Build System (source file, send selection to interactive session)
In the main loop of the script,
you don't need the $a variable.
You can use an infinite loop, 
and break out of it when the if condition becomes true.
You also don't need the semicolons at the end of the lines.

The script can be simplified to:

while :; do
    if xdotool search --name 'Running R' windowactivate --sync; then
        xdotool key --window 0 ctrl+shift+v
        echo 'Initialized.' 
        break
    fi
    sleep 2  # decreasing the value increases asynchrony behavior.
done 


As for this comment:


# in this workaround
# I could not find a better way to properly 
# catch the terminator ending,
# after it receives the 'Running R' name.



Unfortunately I don't know a better way either.