update autocommands for javascript