title: VS Code extension Api to get the Range of the whole text of a document?
body: <p>I haven't found a good way to do it. My current approach is to select all first:</p>
  
  <pre><code>vscode.commands.executeCommand("editor.action.selectAll").then(() =&gt;{
      textEditor.edit(editBuilder =&gt; editBuilder.replace(textEditor.selection, code));
      vscode.commands.executeCommand("cursorMove", {"to": "viewPortTop"});
  });
  </code></pre>
  
  <p>which is not ideal because it flashes when doing selection then replacement.</p>