add command to visit and leave scratch buffer