I\'m writing a vscode plugin to simultaneously comment out and duplicate a line. A key sequence of actions within the plugin (modulo several selections etc) is the following