add javascript switch to test function vimrc