I have an extension that grabs the open file\'s text and alters it. Once the text is altered, how do I put it back into the file that is displayed in VSCode?
Here is the code snippet that will solve your issue :
activeEditor.edit((selectedText) => { selectedText.replace(activeEditor.selection, newText); })